PoolAddressesProviderRegistry
Main registry of PoolAddressesProvider of ParaSpace markets.
Used for indexing purposes of ParaSpace protocol's markets. The id assigned to a PoolAddressesProvider refers to the market it is connected with, for example with 1
for the ParaSpace main market and 2
for the next created.
_addressesProviderToId
_idToAddressesProvider
_addressesProvidersList
_addressesProvidersIndexes
constructor
Constructor.
Parameters
Name | Type | Description |
---|---|---|
owner | address | The owner address of this contract. |
getAddressesProvidersList
Returns the list of registered addresses providers
Return Values
Name | Type | Description |
---|---|---|
[0] | address[] | The list of addresses providers |
registerAddressesProvider
Registers an addresses provider
The PoolAddressesProvider must not already be registered in the registry The id must not be used by an already registered PoolAddressesProvider
Parameters
Name | Type | Description |
---|---|---|
provider | address | The address of the new PoolAddressesProvider |
id | uint256 | The id for the new PoolAddressesProvider, referring to the market it belongs to |
unregisterAddressesProvider
Removes an addresses provider from the list of registered addresses providers
Parameters
Name | Type | Description |
---|---|---|
provider | address | The PoolAddressesProvider address |
getAddressesProviderIdByAddress
Returns the id of a registered PoolAddressesProvider
Parameters
Name | Type | Description |
---|---|---|
addressesProvider | address | The address of the PoolAddressesProvider |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | The id of the PoolAddressesProvider or 0 if is not registered |
getAddressesProviderAddressById
Returns the address of a registered PoolAddressesProvider
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | The id of the market |
Return Values
Name | Type | Description |
---|---|---|
[0] | address | The address of the PoolAddressesProvider with the given id or zero address if it is not registered |
_addToAddressesProvidersList
Adds the addresses provider address to the list.
Parameters
Name | Type | Description |
---|---|---|
provider | address | The address of the PoolAddressesProvider |
_removeFromAddressesProvidersList
Removes the addresses provider address from the list.
Parameters
Name | Type | Description |
---|---|---|
provider | address | The address of the PoolAddressesProvider |