Linker

onlyLinker onlyLinker() modifier

Modifier to make a function callable only if caller is granted with {LINKER_ROLE}.

registerMainnetContract registerMainnetContract(address newMainnetContract) external

Allows Linker to register external mainnet contracts.

Requirements:

  • Contract must be not registered.

removeMainnetContract removeMainnetContract(address mainnetContract) external

Allows Linker to remove external mainnet contracts.

Requirements:

  • Contract must be registered.

connectSchain connectSchain(string schainName, address[] schainContracts) external

Allows Linker to connect mainnet contracts with their receivers on schain.

Requirements:

  • Numbers of mainnet contracts and schain contracts must be equal.

  • Mainnet contract must implement method addSchainContract.

allowInterchainConnections allowInterchainConnections(string schainName) external

Allows Schain owner to connect others chains with their own, thus others schains have opportunity to send messages from chain to chain.

Requirements:

  • Schain should not be in the process of being killed.

kill kill(string schainName) external

Allows Schain owner and contract deployer to kill schain. To kill the schain, both entities must call this function, and the order is not important.

Requirements:

  • Interchain connection should be turned off.

disconnectSchain disconnectSchain(string schainName) external

Allows Linker disconnect schain from the network. This will remove all receiver contracts on schain. Thus, messages will not go from the mainnet to the schain.

Requirements:

  • Mainnet contract should implement method removeSchainContract.

isNotKilled isNotKilled(bytes32 schainHash) → bool external

Returns true if schain is not killed.

hasMainnetContract hasMainnetContract(address mainnetContract) → bool external

Returns true if list of mainnet contracts has particular contract.

hasSchain hasSchain(string schainName) → bool connected external

Returns true if mainnet contracts and schain contracts are connected together for transferring messages.

initialize initialize(contract IContractManager contractManagerOfSkaleManagerValue, contract MessageProxyForMainnet messageProxyValue) public

Create a new Linker contract.