IFxContractRegistry

Git Source

Author: fx(hash)

Registry for managing fxhash smart contracts

Functions

configInfo

Returns the system config information

function configInfo() external view returns (address, uint32, uint32, uint32, uint64, string memory, string memory);

contracts

Mapping of hashed contract name to contract address

function contracts(bytes32) external view returns (address);

register

Registers deployed contract addresses based on hashed value of name

function register(string[] calldata _names, address[] calldata _contracts) external;

Parameters

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

setConfig

Sets the system config information

function setConfig(ConfigInfo calldata _configInfo) external;

Parameters

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

Events

ContractRegistered

Event emitted when contract gets registered

event ContractRegistered(string indexed _contractName, bytes32 indexed _hashedName, address indexed _contractAddr);

Parameters

NameTypeDescription
_contractNamestringName of the contract
_hashedNamebytes32Hashed name of the contract
_contractAddraddressAddress of the contract

ConfigUpdated

Event emitted when the config information is updated

event ConfigUpdated(address indexed _owner, ConfigInfo _configInfo);

Parameters

NameTypeDescription
_owneraddressAddress of the registry owner
_configInfoConfigInfoUpdated config information

Errors

LengthMismatch

Error thrown when array lengths do not match

error LengthMismatch();

LengthZero

Error thrown when array length is zero

error LengthZero();