RegistryBaseAdmin
View Source: @nomisma/elektro-protocol-aux/contracts/registry/RegistryBaseAdmin.sol
↗ Extends: RegistryBaseStorage, IRegistryBaseAdmin ↘ Derived Contracts: RegistryBaseAdminProxy
RegistryBaseAdmin
Contract is used to register contracts used in our systems and set/initialize storage of the module. Some methods can be only called by registered contracts. It prevents unwanted external method call by third party client Initialization contract for Registry.
Functions
initRegistryBase(address _elektroResolver, address _tokenManager, address _tokenValidator)
verify(address contractToVerify)
isValidContract(address _contract)
isValidContractOrUtilityBase(address _contract)
contractsLength()
getContractByIdx(uint256 idx)
_isValidContract(address _contract)
initRegistryBase
Initialization function that can be called only once during initial contract setup initalized
state variable ensures that this function cannot be called again. Initializes the storage of the Registry module. Notice the _elektroResolver
arg that will save this address to storage to point to the ElektroResolver contract for all Elektro markets.
Arguments
_elektroResolver
address
address of Resolver contract to be set in
_tokenManager
address
address of TokenManager contract to be set in
_tokenValidator
address
address of TokenValidator contract to be set in
verify
Adding new contract to list of registered contracts.
Arguments
contractToVerify
address
address of contract to add to the Registry
isValidContract
View that checks if contract is present in Registry storage
Arguments
_contract
address
address of contract to validate
isValidContractOrUtilityBase
View that checks if contract is present in Registry storage. This provides an access point to a higher level function from ElektroRegistryAdmin.
Arguments
_contract
address
address of contract to validate
contractsLength
View that returns amount of registered contracts
Arguments
getContractByIdx
Returning registered contract by idx
Arguments
idx
uint256
address of registered contract
_isValidContract
Arguments
_contract
address
Last updated
Was this helpful?