PoolAddressesProvider
Main registry of addresses part of or connected to the protocol, including permissioned roles
Acts as factory of proxies and admin of those, so with right to change its implementations Owned by the ParaSpace Governance
_marketId
_addresses
_marketplaces
POOL
POOL_CONFIGURATOR
PRICE_ORACLE
ACL_MANAGER
ACL_ADMIN
PRICE_ORACLE_SENTINEL
DATA_PROVIDER
WETH
constructor
Constructor.
Parameters
getMarketId
Returns the id of the ParaSpace market to which this contract points to.
Return Values
setMarketId
Associates an id with a specific PoolAddressesProvider.
This can be used to create an onchain registry of PoolAddressesProviders to identify and validate multiple ParaSpace markets.
Parameters
getAddress
Returns an address by its identifier.
The returned address might be an EOA or a contract, potentially proxied It returns ZERO if there is no registered address with the given id
Parameters
Return Values
setAddress
Sets an address for an id replacing the address saved in the addresses map.
IMPORTANT Use this function carefully, as it will do a hard replacement
Parameters
setAddressAsProxy
General function to update the implementation of a proxy registered with certain id
. If there is no proxy registered, it will instantiate one and set as implementation the newImplementationAddress
.
IMPORTANT Use this function carefully, only for ids that don't have an explicit setter function, in order to avoid unexpected consequences
Parameters
getPool
Returns the address of the Pool proxy.
Return Values
updatePoolImpl
Updates the implementation of the Pool, or creates a proxy setting the new pool
implementation when the function is called for the first time.
Parameters
getPoolConfigurator
Returns the address of the PoolConfigurator proxy.
Return Values
setPoolConfiguratorImpl
Updates the implementation of the PoolConfigurator, or creates a proxy setting the new PoolConfigurator
implementation when the function is called for the first time.
Parameters
getPriceOracle
Returns the address of the price oracle.
Return Values
setPriceOracle
Updates the address of the price oracle.
Parameters
getACLManager
Returns the address of the ACL manager.
Return Values
setACLManager
Updates the address of the ACL manager.
Parameters
getACLAdmin
Returns the address of the ACL admin.
Return Values
setACLAdmin
Updates the address of the ACL admin.
Parameters
getPriceOracleSentinel
Returns the address of the price oracle sentinel.
Return Values
setPriceOracleSentinel
Updates the address of the price oracle sentinel.
Parameters
getPoolDataProvider
Returns the address of the data provider.
Return Values
getWETH
Returns the address of the Wrapped ETH.
Return Values
getMarketplace
Returns the info of the marketplace.
Return Values
setProtocolDataProvider
Updates the address of the data provider.
Parameters
setWETH
Updates the address of the WETH.
Parameters
setMarketplace
Updates the info of the marketplace.
Parameters
_updateImpl
Internal function to update the implementation of a specific proxied component of the protocol.
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 If there is already a proxy registered, it just updates the implementation to newAddress
and calls the initialize() function via upgradeToAndCall() in the proxy
Parameters
_updateParaProxyImpl
Internal function to update the implementation of a specific proxied component of the protocol that uses ParaProxy.
_If there is no proxy registered with the given identifier, it creates the proxy setting newAddress
as implementation and calls the calldata on the init If there is already a proxy registered, it just updates the implementation using the implementationParams
Parameters
_setMarketId
Updates the identifier of the ParaSpace market.
Parameters
_getProxyImplementation
Returns the the implementation contract of the proxy contract by its identifier.
It returns ZERO if there is no registered address with the given id It reverts if the registered address with the given id is not InitializableImmutableAdminUpgradeabilityProxy