PoolAddressesProvider
PoolAddressesProvider
Addresses register of the protocol for a particular market. This contract is immutable and the address will never change.
Whenever the `Pool` contract is needed, we recommended you fetch the correct address from the `PoolAddressesProvider` smart contract.
The source code can be found on Github
View Methods
getMarketId
Fetch the market id of the associated Themis 2.0 market.
Return Values
Type | Description |
---|---|
string | A string representation of the market |
getAddress
Fetch the address of the protocol contract stored at the given id.
Call Params
Name | Type | Description |
---|---|---|
id | bytes32 | id. Example, the Protocol Data Provider uses id 0x1 |
Return Values
Type | Description |
---|---|
address | The address associated with the bytes32 id passed |
getPool
Fetch the contract of latest pool
Return Values
Type | Description |
---|---|
address | The address of the associated Pool |
getPoolConfigurator
Fetch the PoolConfigurator is used for configuration methods, like init reserves or update token implementation etc, of the market.
Return Value
Type | Description |
---|---|
address | The address of associated market’s PoolConfigurator |
getPriceOracle
function getPriceOracle() external view override returns (address)
Fetch Price Oracle used by the market.
Return Value
Type | Description |
---|---|
address | The address of the price oracle used by associated market. |
getACLManager
Fetch ACLManger that manages the system role of the market
Return Value
Type | Description |
---|---|
address | The address of the ACLManger contract managing the system role of the associated market. |
getACLAdmin
Fetch ACLAdmin of the market which holds the DEFAULT_ADMIN_ROLE in ACLManager.
Return Value
Type | Description |
---|---|
address | The address of the access control list admin of the associated market. |
getPriceOracleSentinel
Return Value
Type | Description |
---|---|
address | The address of the Price oracle sentinel of the associated market. |
getPoolDataProvider
Fetch address of latest pool data provider.
Return Value
Type | Description |
---|---|
address | The address of the pool data provider of the associated market. |
getM1Pool
Fetch the contract of latest M1 pool
Return Values
Type | Description |
---|---|
address | The address of the associated M1 Pool |
getM1PoolConfigurator
Fetch the M1 PoolConfigurator is used for configuration methods, like init reserves or update token implementation etc, of the market.
Return Value
Type | Description |
---|---|
address | The address of associated market’s M1 PoolConfigurator |
getM1CollateralValueCalculator
M1 pool collateral calculation contract for M1 collateral value calculation
Return Value
Type | Description |
---|---|
address | The address of associated market’s CollateralValueCalculator |
Write Methods
setMarketId
Call Params
Name | Type | Description |
---|---|---|
newMarketId | string | The new id of the market |
setAddress
Sets the address of protocol contract stored at given id.
Eg. utils.keccak256(utils.toUtf8Bytes("INCENTIVES_CONTROLLER"))
is set to address of INCENTIVES_CONTROLLER
Call Params
Name | Type | Description |
---|---|---|
id | bytes32 | keccak256 hash of UTF8Bytes string representing Contract |
newAddress | address | The new address to be set corresponding to the |
setAddressAsProxy
Sets/updates the implementation address of a specific proxied protocol contract.
If there is no proxy registered with the given identifier, it creates the proxy setting newAddress as implementation and calls the initialize() function on the proxy
Call Params
Name | Type | Description |
---|---|---|
id | bytes32 | id of Proxy contract |
newImplementationAddress | address | The address of new implementation contract corresponding to the proxy |
setPoolImpl
Sets/update the implementation of the POOL proxy contract.
Call Params
Name | Type | Description |
---|---|---|
newPoolImpl | address | The address of new Pool implementation contract |
setPoolConfiguratorImp
Sets/updates the implementation of the POOL_CONFIGURATOR proxy contract.
Call Params
Name | Type | Description |
---|---|---|
newPoolConfiguratorImpl | address | The address of new PoolConfigurator implementation contract |
setPriceOracle
Sets/updates address of the PriceOracle contract.
Call Params
Name | Type | Description |
---|---|---|
newPriceOracle | address | The address of new PriceOracle contract |
setACLAdmin
Sets/updates address of the AclAdmin.
Call Params
Name | Type | Description |
---|---|---|
newAclAdmin | address | The address of new AclAdming |
setPriceOracleSentinel
Sets/updates address of the Price oracle sentinel.
Call Params
Name | Type | Description |
---|---|---|
newPriceOracleSentinel | address | The address of new PriceOracleSentinel |
setPoolDataProvider
Sets/updates address of PoolDataProvider.
Call Params
Name | Type | Description |
---|---|---|
newDataProvider | address | The address of new PoolDataProvider |
setM1PoolImpl
Sets/update the implementation of the POOL proxy contract.
Call Params
Name | Type | Description |
---|---|---|
newM1PoolImpl | address | The address of new M1Pool implementation contract |
setM1PoolConfiguratorImpl
Sets/updates the implementation of the M1_POOL_CONFIGURATOR proxy contract.
Call Params
Name | Type | Description |
---|---|---|
newM1PoolConfiguratorImpl | address | The address of new M1PoolConfigurator implementation contract |
Last updated