Skip to main content

ParentMessengerBase

ParentMessengerBase#

Functions#

constructor(uint256 _childChainId) (internal)

Construct the ParentMessengerBase contract.

Parameters:#

  • _childChainId: The chain id of the L2 network this messenger should connect to.
setChildMessenger(address newChildMessenger) (public)

Changes the stored address of the child messenger, deployed on L2.

The caller of this function must be the owner. This should be set to the DVM governor.

Parameters:#

  • newChildMessenger: address of the new child messenger, deployed on L2.
setOracleHub(address newOracleHub) (public)

Changes the stored address of the Oracle hub, deployed on L1.

The caller of this function must be the owner. This should be set to the DVM governor.

Parameters:#

  • newOracleHub: address of the new oracle hub, deployed on L1 Ethereum.
setGovernorHub(address newGovernorHub) (public)

Changes the stored address of the Governor hub, deployed on L1.

The caller of this function must be the owner. This should be set to the DVM governor.

Parameters:#

  • newGovernorHub: address of the new governor hub, deployed on L1 Ethereum.
setOracleSpoke(address newOracleSpoke) (public)

Changes the stored address of the oracle spoke, deployed on L2.

The caller of this function must be the owner. This should be set to the DVM governor.

Parameters:#

  • newOracleSpoke: address of the new oracle spoke, deployed on L2.
setGovernorSpoke(address newGovernorSpoke) (public)

Changes the stored address of the governor spoke, deployed on L2.

The caller of this function must be the owner. This should be set to the DVM governor.

Parameters:#

  • newGovernorSpoke: address of the new governor spoke, deployed on L2.
getL1CallValue() โ†’ uint256 (external)

Returns the amount of ETH required for a caller to pass as msg.value when calling sendMessageToChild.

sendMessageToChild(bytes data) (external)
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.

_msgSender() โ†’ address (internal)
_msgData() โ†’ bytes (internal)

Events#

SetChildMessenger(address childMessenger)
SetOracleHub(address oracleHub)
SetGovernorHub(address governorHub)
SetOracleSpoke(address oracleSpoke)
SetGovernorSpoke(address governorSpoke)
OwnershipTransferred(address previousOwner, address newOwner)

Modifiers#

onlyHubContract()
onlyOwner()

Throws if called by any account other than the owner.