AddressesProvider

AddressesProvider

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

Updates the address of fee distributor.

Call Params

Name
Type
Description

newFeeDistributor

address

The address of the new FeeDistributor

ABI

AddressesProvider ABI
[
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "bytes32",
          "name": "key",
          "type": "bytes32"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "oldAddress",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "AddressSet",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "oldAddress",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "FeeDistributorUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "previousOwner",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "OwnershipTransferred",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "oldAddress",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "ParametersProviderUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "oldAddress",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "PremiumEngineUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "oldAddress",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "PriceOracleUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "oldAddress",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "RiskPoolCoreUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "oldAddress",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "RiskPoolManagerUpdated",
      "type": "event"
    },
    {
      "anonymous": false,
      "inputs": [
        {
          "indexed": true,
          "internalType": "address",
          "name": "oldAddress",
          "type": "address"
        },
        {
          "indexed": true,
          "internalType": "address",
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "RiskPoolUpdated",
      "type": "event"
    },
    {
      "inputs": [
        {
          "internalType": "contract TransparentUpgradeableProxy",
          "name": "proxy",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "newAdmin",
          "type": "address"
        }
      ],
      "name": "changeProxyAdmin",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "key",
          "type": "bytes32"
        }
      ],
      "name": "getAddress",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getFeeDistributor",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getParametersProvider",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getPremiumEngine",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getPriceOracle",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract TransparentUpgradeableProxy",
          "name": "proxy",
          "type": "address"
        }
      ],
      "name": "getProxyAdmin",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract TransparentUpgradeableProxy",
          "name": "proxy",
          "type": "address"
        }
      ],
      "name": "getProxyImplementation",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getRiskPool",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getRiskPoolCore",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "getRiskPoolManager",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "owner",
      "outputs": [
        {
          "internalType": "address",
          "name": "",
          "type": "address"
        }
      ],
      "stateMutability": "view",
      "type": "function"
    },
    {
      "inputs": [],
      "name": "renounceOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "bytes32",
          "name": "key",
          "type": "bytes32"
        },
        {
          "internalType": "address",
          "name": "newAddress",
          "type": "address"
        }
      ],
      "name": "setAddress",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newFeeDistributor",
          "type": "address"
        }
      ],
      "name": "setFeeDistributor",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newParametersProvider",
          "type": "address"
        }
      ],
      "name": "setParametersProvider",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newPremiumEngine",
          "type": "address"
        }
      ],
      "name": "setPremiumEngine",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newPriceOracle",
          "type": "address"
        }
      ],
      "name": "setPriceOracle",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newRiskPool",
          "type": "address"
        }
      ],
      "name": "setRiskPool",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newRiskPoolCore",
          "type": "address"
        }
      ],
      "name": "setRiskPoolCore",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newRiskPoolManager",
          "type": "address"
        }
      ],
      "name": "setRiskPoolManager",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "address",
          "name": "newOwner",
          "type": "address"
        }
      ],
      "name": "transferOwnership",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract TransparentUpgradeableProxy",
          "name": "proxy",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "implementation",
          "type": "address"
        }
      ],
      "name": "upgrade",
      "outputs": [],
      "stateMutability": "nonpayable",
      "type": "function"
    },
    {
      "inputs": [
        {
          "internalType": "contract TransparentUpgradeableProxy",
          "name": "proxy",
          "type": "address"
        },
        {
          "internalType": "address",
          "name": "implementation",
          "type": "address"
        },
        {
          "internalType": "bytes",
          "name": "data",
          "type": "bytes"
        }
      ],
      "name": "upgradeAndCall",
      "outputs": [],
      "stateMutability": "payable",
      "type": "function"
    }
  ]

Last updated