AddressProviderRegistry
LendingPoolAddressesProviderRegistery
一个活跃的 LendingPoolAddressesProvider
合约的寄存器,覆盖所有市场。这个合约是不可变的,地址永远不可变。另请参阅 已部署的合约 部分。
例如,主市场的 LendingPool 地址与 Uniswap 市场的 LendingPool 地址不同。
Methods
getAddressesProvidersList()
function getAddressesProvidersList()
返回活跃LendingPoolAddressesProvider
合约列表。
getAddressesProviderIdByAddress()
function getAddressesProviderIdByAddress(address addressesProvider)
返回 LendingPoolAddressesProvider
的 ID。
参数名称 | 类型 | 描述 |
---|---|---|
provider |
address | addresses provider 的地址 |
ABI
[
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "newAddress",
"type": "address"
}
],
"name": "AddressesProviderRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "newAddress",
"type": "address"
}
],
"name": "AddressesProviderUnregistered",
"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"
},
{
"inputs": [
{
"internalType": "address",
"name": "addressesProvider",
"type": "address"
}
],
"name": "getAddressesProviderIdByAddress",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getAddressesProvidersList",
"outputs": [
{
"internalType": "address[]",
"name": "",
"type": "address[]"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "provider",
"type": "address"
},
{
"internalType": "uint256",
"name": "id",
"type": "uint256"
}
],
"name": "registerAddressesProvider",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "provider",
"type": "address"
}
],
"name": "unregisterAddressesProvider",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
}
]
ILendingPoolAddressesProviderRegistry
// SPDX-License-Identifier: agpl-3.0
pragma solidity 0.6.12;
/**
* @title LendingPoolAddressesProviderRegistry contract
* @dev Main registry of LendingPoolAddressesProvider of multiple Aave protocol's markets
* - Used for indexing purposes of Aave protocol's markets
* - The id assigned to a LendingPoolAddressesProvider refers to the market it is connected with,
* for example with `0` for the Aave main market and `1` for the next created
* @author Aave
**/
interface ILendingPoolAddressesProviderRegistry {
event AddressesProviderRegistered(address indexed newAddress);
event AddressesProviderUnregistered(address indexed newAddress);
function getAddressesProvidersList() external view returns (address[] memory);
function getAddressesProviderIdByAddress(address addressesProvider)
external
view
returns (uint256);
function registerAddressesProvider(address provider, uint256 id) external;
function unregisterAddressesProvider(address provider) external;
}
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 Q1ngying!