PoolAddressesProvider
Last updated
Was this helpful?
Last updated
Was this helpful?
The main addresses register of the protocol, for particular markets. The latest contract addresses should be retrieved from this contract by making the appropriate calls.
The PoolAddressesProvider contract is the main registry of addresses that are part of, or connected to the Protocol, including permissioned roles. It acts as a factory of proxies and is the admin of those, and therefore has the right to change its implementations.
The addresses provider manages various protocol modules and has the ability to update pointers (e.g. update the ACLManager contract) or update the implementation of proxy contracts (e.g. update the implementation).
It specifies the initial holder of the DEFAULT_ADMIN_ROLE, it is immutable, and the address will never change.
Whenever the contract is needed, we recommended you fetch the correct address from this PoolAddressesProvider smart contract.
The source code is available on GitHub.
This contract is owned by the Nexus Governance.
Updates the identifier of the Nexus market by associating an id with a specific PoolAddressesProvider. This can be used to create an on-chain registry of pool addresses providers to identify and validate multiple Nexus markets.
Input Parameters:
newMarketId
string
The new id of the market
Sets the address of the protocol contract stored at the given id, replacing the address saved in the addresses map.
For example, utils.keccak256(utils.toUtf8Bytes("INCENTIVES_CONTROLLER"))
, is set to the address of INCENTIVES_CONTROLLER
.
Use this function carefully, as it will do a hard replacement of the current address in the addresses map.
Input Parameters:
id
bytes32
keccak256
hash of UTF8Bytes
string representing contract
newAddress
address
The new address to be set corresponding to the id
Updates the implementation address of a proxy contract with a specified id.
If there is no proxy registered, it will instantiate one and set the implementation as the newImplementationAddress
.
Use this function carefully, only for ids that do not have an explicit setter function in order to avoid unexpected consequences.
Input Parameters:
id
bytes32
The id of the proxy contract
newImplementationAddress
address
The address of new implementation contract corresponding to the proxy
Input Parameters:
newPoolImpl
address
The address of new Pool implementation contract
Input Parameters:
newPoolConfiguratorImpl
address
The address of new PoolConfigurator implementation contract
Updates the address of the price oracle.
Input Parameters:
newPriceOracle
address
The address of new price oracle
Updates the address of the Access Control List Manager.
Input Parameters:
newAclManager
address
The address of the new ACLManager
Updates the address of the Access Control List Admin.
Input Parameters:
newAclAdmin
address
The address of new ACLAdmin
Updates the address of the price oracle sentinel.
Input Parameters:
newPriceOracleSentinel
address
The address of new PriceOracleSentinel
Updates the address of the data provider.
Input Parameters:
newDataProvider
address
The address of new DataProvider
Returns the market id of the associated Nexus market.
Return Values:
string
A string representation of the market id
Returns the address of protocol contract stored at the given id. The returned address might be an EOA or a contract, which may be proxied. It will return ZERO if there is no registered address with the given id.
Input Parameters:
id
bytes32
The id. For example, the Protocol Data Provider uses id 0x1
Return Values:
address
The address associated with the id passed
Example:
Returns the address of the latest Pool proxy contract.
Return Values:
address
The address of the associated Pool proxy
Return Values:
address
The PoolConfigurator
proxy address
Returns the address of the Price Oracle used by the market.
Return Values:
address
The address of the price oracle used by the associated market
Returns the address of the Access Control List Manager (ACLManager) that manages the system role of the market.
Return Values:
address
The address of the ACLManger
contract managing the system role of the associated market
Returns the address of the Access Control List Admin (ACLAdmin) of the market which holds the DEFAULT_ADMIN_ROLE
in ACLManager.
Return Values:
address
The address of the Access Control List admin of the associated market
Returns the address of the price oracle sentinel.
Return Values:
address
The address of the PriceOracleSentinel
of the associated market
Returns the address of latest pool data provider.
Return Values:
address
The address of the pool data provider of the associated market
Updates the implementation of the contract, or creates a proxy.
Updates the implementation of the contract, or creates a proxy.
Returns the address of the proxy. Used for configuration methods, like init reserves or update token implementation etc, of the market.