Skip to main content

GovernorChildTunnel

GovernorChildTunnel#

Functions#

constructor(address _fxChild) (public)
_processMessageFromRoot(uint256, address sender, bytes data) (internal)

Executes governance transaction created on Ethereum.

The data will be received automatically from the state receiver when the state is synced between Ethereum and Polygon. This will revert if the Root chain sender is not the fxRootTunnel contract.

Parameters:#

  • sender: The sender of data from the Root chain.
  • data: ABI encoded params to include in delegated transaction.
setFxRootTunnel(address _fxRootTunnel) (public)
processMessageFromRoot(uint256 stateId, address rootMessageSender, bytes data) (public)
_sendMessageToRoot(bytes message) (internal)

Emit message that can be received on Root Tunnel

Call the internal function when need to emit message

Parameters:#

  • message: bytes message that will be sent to Root Tunnel some message examples - abi.encode(tokenId); abi.encode(tokenId, tokenMetadata); abi.encode(messageType, messageData);

Events#

ExecutedGovernanceTransaction(address to, bytes data)
MessageSent(bytes message)

Modifiers#

validateSender(address sender)