FxContractRegistry
Inherits: IFxContractRegistry, Ownable
Author: fx(hash)
See the documentation in {IFxContractRegistry}
State Variables
configInfo
Returns the system config information
ConfigInfo public configInfo;
contracts
Mapping of hashed contract name to contract address
mapping(bytes32 => address) public contracts;
Functions
constructor
Initializes registry owner and system config information
constructor(address _admin, ConfigInfo memory _configInfo) Ownable;
register
Registers deployed contract addresses based on hashed value of name
function register(string[] calldata _names, address[] calldata _contracts) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_names | string[] | Array of contract names |
_contracts | address[] | Array of contract addresses |
setConfig
Sets the system config information
function setConfig(ConfigInfo calldata _configInfo) external onlyOwner;
Parameters
Name | Type | Description |
---|---|---|
_configInfo | ConfigInfo | Config information (lock time, referrer share, default metadata) |
_setConfigInfo
Sets the system config information
function _setConfigInfo(ConfigInfo memory _configInfo) internal;