PoolAddressesProviderRegistry
Registry of addresses providers for markets.
🔹Constructor
constructor(address owner)Initializes the contract and assigns the initialownerwho has admin rights.
🔹View Functions (read-only)
getAddressesProviderAddressById(uint256 id) → addressReturns the provider’s address linked to a given market ID. If no provider exists for that ID, it returns the zero address.getAddressesProviderIdByAddress(address provider) → uint256Returns the ID assigned to a specific provider address. If the provider is not registered, it returns0.getAddressesProvidersList() → address[]Returns the full list of currently registered providers.owner() → addressReturns the address of the current contract owner.
🔹State-Changing Functions (write operations)
registerAddressesProvider(address provider, uint256 id)Registers a new provider.The provider must not already be registered.
The ID must be unique (not used by another provider). Only callable by the contract owner.
unregisterAddressesProvider(address provider)Removes a provider from the registry, freeing its ID. Only callable by the contract owner.transferOwnership(address newOwner)Transfers ownership rights from the current owner to anewOwner. Only callable by the current owner.renounceOwnership()The current owner gives up ownership permanently. After this, no one will have special admin rights. This action cannot be undone.
🔹Events
AddressesProviderRegistered(address provider, uint256 id)Triggered when a provider is registered.AddressesProviderUnregistered(address provider, uint256 id)Triggered when a provider is removed from the registry.OwnershipTransferred(address previousOwner, address newOwner)Triggered when ownership is transferred to a new account.
Copy
[
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "addressesProvider", "type": "address" },
{ "indexed": true, "internalType": "uint256", "name": "id", "type": "uint256" }
],
"name": "AddressesProviderRegistered",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{ "indexed": true, "internalType": "address", "name": "addressesProvider", "type": "address" },
{ "indexed": true, "internalType": "uint256", "name": "id", "type": "uint256" }
],
"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": "uint256", "name": "id", "type": "uint256" }],
"name": "getAddressesProviderAddressById",
"outputs": [{ "internalType": "address", "name": "", "type": "address" }],
"stateMutability": "view",
"type": "function"
},
{
"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"
}
]
Last updated
Was this helpful?