Skip to content

IContractRegistry

IContractRegistry

InvalidContractEntityInterface

error InvalidContractEntityInterface()

Thrown when the contract with a provided key does not exist.

ContractKeyMismatch

error ContractKeyMismatch(bytes4 keyProvided, bytes4 keyRequired)

Thrown when the contract with a provided key does not exist.

ContractNotAuthorized

error ContractNotAuthorized(bytes4 keyProvided, address addressProvided)

Thrown when the contract with a provided key does not exist.

ContractDoesNotExist

error ContractDoesNotExist(bytes4 keyProvided)

Thrown when the contract with a provided key does not exist.

ContractRegistered

event ContractRegistered(bytes4 contractKey, address contractAddress)

Emitted when the new contract is registered.

Name Type Description
contractKey bytes4 Key of the contract.
contractAddress address Address of the contract.

registerContract

function registerContract(bytes4 contractKey, address contractAddress) external

Register new contract with a key.

Name Type Description
contractKey bytes4 Key of the contract.
contractAddress address Address of the contract.

getContract

function getContract(bytes4 contractKey) external view returns (address)

Get contract address with a key.

Name Type Description
contractKey bytes4 Key of the contract.
Name Type Description
[0] address Contract address.