GovernorRootTunnel
GovernorRootTunnel
#
#
Functionsconstructor(address _checkpointManager, address _fxRoot) (public)
relayGovernance(address to, bytes data) (external)
This should be called in order to relay a governance request to the GovernorChildTunnel
contract
deployed to the sidechain. Note: this can only be called by the owner (presumably the Ethereum Governor
contract).
The transaction submitted to to
on the sidechain with the calldata data
is assumed to have 0 value
in order to avoid the added complexity of sending cross-chain transactions with positive value.
_processMessageFromChild(bytes data) (internal)
Function called as callback from child tunnel. Should not do anything as governance actions should only be sent from root to child.
_preEntranceCheck() (internal)
_preEntranceSet() (internal)
_postEntranceReset() (internal)
setFxChildTunnel(address _fxChildTunnel) (public)
_sendMessageToChild(bytes message) (internal)
Send bytes message to Child Tunnel
#
Parameters:- message: bytes message that will be sent to Child Tunnel some message examples - abi.encode(tokenId); abi.encode(tokenId, tokenMetadata); abi.encode(messageType, messageData);
_validateAndExtractMessage(bytes inputData) โ bytes (internal)
receiveMessage(bytes inputData) (public)
receive message from L2 to L1, validated by proof
This function verifies if the transaction actually happened on child chain
#
Parameters:- inputData: RLP encoded data of the reference tx containing following list of fields 0 - headerNumber - Checkpoint header block number containing the reference tx 1 - blockProof - Proof that the block header (in the child chain) is a leaf in the submitted merkle root 2 - blockNumber - Block number containing the reference tx on child chain 3 - blockTime - Reference tx block time 4 - txRoot - Transactions root of block 5 - receiptRoot - Receipts root of block 6 - receipt - Receipt of the reference transaction 7 - receiptProof - Merkle proof of the reference receipt 8 - branchMask - 32 bits denoting the path of receipt in merkle tree 9 - receiptLogIndex - Log Index to read from the receipt
owner() โ address (public)
Returns the address of the current owner.
renounceOwnership() (public)
Leaves the contract without owner. It will not be possible to call
onlyOwner
functions anymore. Can only be called by the current owner.
NOTE: Renouncing ownership will leave the contract without an owner,
thereby removing any functionality that is only available to the owner.
transferOwnership(address newOwner) (public)
Transfers ownership of the contract to a new account (newOwner
).
Can only be called by the current owner.
_transferOwnership(address newOwner) (internal)
Transfers ownership of the contract to a new account (newOwner
).
Internal function without access restriction.
_msgSender() โ address (internal)
_msgData() โ bytes (internal)
#
EventsRelayedGovernanceRequest(address to, bytes data)
OwnershipTransferred(address previousOwner, address newOwner)
#
ModifiersnonReentrant()
Prevents a contract from calling itself, directly or indirectly.
Calling a nonReentrant
function from another nonReentrant
function is not supported. It is possible to
prevent this from happening by making the nonReentrant
function external, and making it call a private
function that does the actual state modification.
nonReentrantView()
Designed to prevent a view-only method from being re-entered during a call to a nonReentrant()
state-changing method.
onlyOwner()
Throws if called by any account other than the owner.