PoolAddressesProvider
Inherits: IPoolAddressesProvider
State Variables
_marketId
string private _marketId;
_addresses
mapping(bytes32 => address) private _addresses;
POOL_CONFIGURATOR
bytes32 private constant POOL_CONFIGURATOR = "POOL_CONFIGURATOR";
ISLE_GLOBALS
bytes32 private constant ISLE_GLOBALS = "ISLE_GLOBALS";
LOAN_MANAGER
bytes32 private constant LOAN_MANAGER = "LOAN_MANAGER";
WITHDRAWAL_MANAGER
bytes32 private constant WITHDRAWAL_MANAGER = "WITHDRAWAL_MANAGER";
Functions
onlyGovernor
modifier onlyGovernor();
constructor
constructor(string memory marketId_, IIsleGlobals globals_);
getMarketId
function getMarketId() external view override returns (string memory marketId_);
setMarketId
function setMarketId(string memory newMarketId_) external override onlyGovernor;
getPoolConfigurator
Retrieves the address of the PoolConfigurator proxy.
function getPoolConfigurator() external view override returns (address);
Returns
<none>
address
The address of the PoolConfigurator proxy.
setPoolConfiguratorImpl
Sets or initializes the PoolConfigurator proxy with a new implementation.
function setPoolConfiguratorImpl(
address newPoolConfiguratorImpl,
bytes calldata params
)
external
override
onlyGovernor;
Parameters
newPoolConfiguratorImpl
address
The address of the new PoolConfigurator implementation.
params
bytes
The initialization parameters for the PoolConfigurator.
getLoanManager
Retrieves the address of the LoanManager proxy.
function getLoanManager() external view override returns (address);
Returns
<none>
address
The address of the LoanManager proxy.
setLoanManagerImpl
Sets or initializes the LoanManager proxy with a new implementation.
function setLoanManagerImpl(address newLoanManagerImpl, bytes calldata params) external override onlyGovernor;
Parameters
newLoanManagerImpl
address
The address of the new LoanManager implementation.
params
bytes
The initialization parameters for the LoanManager.
getWithdrawalManager
Retrieves the address of the WithdrawalManager proxy.
function getWithdrawalManager() external view override returns (address);
Returns
<none>
address
The address of the WithdrawalManager proxy.
setWithdrawalManagerImpl
Sets or initializes the WithdrawalManager proxy with a new implementation.
function setWithdrawalManagerImpl(
address newWithdrawalManagerImpl,
bytes calldata params
)
external
override
onlyGovernor;
Parameters
newWithdrawalManagerImpl
address
The address of the new WithdrawalManager implementation.
params
bytes
The initialization parameters for the WithdrawalManager.
setAddressAsProxy
Updates or initializes a proxy for a given identifier with a new implementation address.
Use with caution for identifiers without dedicated setter functions to prevent unintended effects.
function setAddressAsProxy(
bytes32 id,
address newImplementationAddress,
bytes calldata params
)
external
override
onlyGovernor;
Parameters
id
bytes32
The identifier of the contract to update.
newImplementationAddress
address
The address of the new implementation.
params
bytes
The initialization parameters for the proxy contract.
getIsleGlobals
Retrieves the address of IsleGlobals.
function getIsleGlobals() external view override returns (address);
Returns
<none>
address
The address of IsleGlobals.
setIsleGlobals
Sets a new address for IsleGlobals, replacing the current address in the registry.
function setIsleGlobals(address newIsleGlobals) external override onlyGovernor;
Parameters
newIsleGlobals
address
The new address for IsleGlobals.
getAddress
Fetches an address associated with a given identifier.
Can return either a direct contract address or a proxy address.
function getAddress(bytes32 id) public view override returns (address);
Parameters
id
bytes32
The identifier of the contract to retrieve.
Returns
<none>
address
The address associated with the specified identifier.
setAddress
Directly sets a new address for a given identifier, replacing the current address.
Use with caution as this will overwrite the existing address without any checks.
function setAddress(bytes32 id, address newAddress) external override onlyGovernor;
Parameters
id
bytes32
The identifier for which to set the address.
newAddress
address
The new address to associate with the identifier.
_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
function _updateImpl(bytes32 id, address newAddress) internal;
Parameters
id
bytes32
The id of the proxy to be updated
newAddress
address
The address of the new implementation
_updateImpl
function _updateImpl(bytes32 id, address newAddress, bytes memory params) internal;
_setMarketId
Updates the identifier of the Isle market.
function _setMarketId(string memory newMarketId) internal;
Parameters
newMarketId
string
The new id of the market
_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
function _getProxyImplementation(bytes32 id) internal view returns (address);
Parameters
id
bytes32
The id
Returns
<none>
address
The address of the implementation contract
Last updated