RegistryBaseStorage
Used to store most critical contract addresses
View Source: @nomisma/elektro-protocol-aux/contracts/registry/RegistryBaseStorage.sol
↗ Extends: RoleAware, Resolvable, OnlyRouterAccess ↘ Derived Contracts: ElektroRegistryStorage, RegistryBaseAdmin, RegistryBaseSetters
RegistryBaseStorage
Contract is used as a single place to keep addresses of major contracts used in Elektro. Instead of passing all needed contract addresses to contracts that need them, only Registry contract is passed. This approach ensures that change of contract address is done in one place, instead of multiple updates in all the contracts.
Structs
ContractStorage
struct ContractStorage {
uint256 length,
mapping(uint256 => address) _contractsByIdx,
mapping(address => bool) _contractsByAddress
}
Contract Members
Constants & Variables
Address of {TokenManagerRouter}
address public tokenManager;
Address of {EventEmitterRouter}
address public eventEmitter;
Address of {TokenValidator}
address public tokenValidator;
Address of {ElektroResolver} - Resolver for the Elektro market module.
contract Resolver public elektroResolver;
Variable to prevent subsequent initializations of the module's storage. Can only be set once during the construction of the higher level contract. Setting this var to 'true' should be done in the higher level contract since there might be extra functionality that can potentially fail after initRegistryBase() is complete
bool public initialized;
See {ContractStorage} struct
struct RegistryBaseStorage.ContractStorage internal contractStorage;
Modifiers
onlySelf
onlySelf
Modifier protecting functions that can only be called by the same module.
modifier onlySelf() internal
Arguments
Functions
Last updated
Was this helpful?