PoolAddressesProviderRegistry

Registry of addresses providers for markets.

🔹Constructor

  • constructor(address owner) Initializes the contract and assigns the initial owner who has admin rights.


🔹View Functions (read-only)

  • getAddressesProviderAddressById(uint256 id) → address Returns 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) → uint256 Returns the ID assigned to a specific provider address. If the provider is not registered, it returns 0.

  • getAddressesProvidersList() → address[] Returns the full list of currently registered providers.

  • owner() → address Returns 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 a newOwner. 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

Last updated

Was this helpful?