Main registry of addresses part of or connected to the protocol, including permissioned roles. Acts as a factory of addresses that are part of the Insure protocol. This contract is immutable and the address will never change.
Whenever the `RiskPool` contract is needed, we recommended you fetch the correct address from the `AddressesProvider` smart contract.
View Methods
getAddress
function getAddress(bytes32 key) public view returns (address)
Fetch an address by its identifier.
Call Params
Name
Type
Description
id
bytes32
id
Return Values
Type
Description
address
The address associated with the bytes32 id passed
getRiskPoolCore
function getRiskPoolCore() external view returns (address)
Fetch the RiskPoolCore contract.
Return Values
Type
Description
address
The RiskPoolCore address
getRiskPool
function getRiskPool() external view returns (address)
Fetch the RiskPool contract.
Return Values
Type
Description
address
The RiskPool address
getPremiumEngine
function getPremiumEngine() external view returns (address)
Fetch the contract of PremiumEngine.
Return Values
Type
Description
address
The PremiumEngine address
getParametersProvider
function getParametersProvider() external view returns (address)
Fetch the contract of ParametersProvider.
Return Values
Type
Description
address
The ParametersProvider address
getRiskPoolManager
function getRiskPoolManager() external view returns (address)
Fetch the address of risk pool manager.
Return Values
Type
Description
address
The RiskPoolManager address
getPriceOracle
function getPriceOracle() external view returns (address)
Fetch Price Oracle used by Insure.
Return Values
Type
Description
address
The PriceOracle address
getFeeDistributor
function getFeeDistributor() external view returns (address)
Fetch the contract of FeeDistributor.
Return Values
Type
Description
address
The FeeDistributor address
Write Methods
The following functions are only available to theOWNERrole.
setAddress
function setAddress(bytes32 key, address newAddress) external
Sets an address for a key replacing the address saved in the addresses map.
Call Params
IMPORTANT Use this function carefully, as it will do a hard replacement
Name
Type
Description
key
bytes32
The key
newAddress
address
The address to set
setRiskPoolCore
function setRiskPoolCore(address newRiskPoolCore) external
Updates the address of risk pool core.
Call Params
Name
Type
Description
newRiskPoolCore
address
The address of the new RiskPool
setRiskPool
function setRiskPool(address newRiskPool) external
Updates the address of risk pool.
Call Params
Name
Type
Description
newRiskPool
address
The address of the new RiskPool
setPremiumEngine
function setPremiumEngine(address newPremiumEngine) external
Updates the address of premium engine.
Call Params
Name
Type
Description
newPremiumEngine
address
The address of the new PremiumEngine
setParametersProvider
function setParametersProvider(address newParametersProvider) external
Updates the address of parameters provider.
Call Params
Name
Type
Description
newParametersProvider
address
The address of the new ParametersProvider
setRiskPoolManager
function setRiskPoolManager(address newRiskPoolManager) external
Updates the address of risk pool manager.
Call Params
Name
Type
Description
newRiskPoolManager
address
The address of the new RiskPoolManager
setPriceOracle
function setPriceOracle(address newPriceOracle) external
Updates the address of price oracle.
Call Params
Name
Type
Description
newPriceOracle
address
The address of the new PriceOracle
setFeeDistributor
function setFeeDistributor(address newFeeDistributor) external