FxContractRegistry

Git Source

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

NameTypeDescription
_namesstring[]Array of contract names
_contractsaddress[]Array of contract addresses

setConfig

Sets the system config information

function setConfig(ConfigInfo calldata _configInfo) external onlyOwner;

Parameters

NameTypeDescription
_configInfoConfigInfoConfig information (lock time, referrer share, default metadata)

_setConfigInfo

Sets the system config information

function _setConfigInfo(ConfigInfo memory _configInfo) internal;