GovernorHub
GovernorHub
#
Governance relayer contract to be deployed on Ethereum that receives messages from the owner (Governor) and sends them to spoke contracts on child chains.
#
FunctionssetMessenger(uint256 chainId, contract ParentMessengerInterface messenger) (public)
Set new ParentMessenger contract for chainId.
Only callable by the owner (presumably the Ethereum Governor contract).
#
Parameters:- chainId: child network that messenger contract will communicate with.
- messenger: ParentMessenger contract that sends messages to ChildMessenger on network with ID
chainId
.
relayGovernance(uint256 chainId, struct GovernorSpoke.Call[] calls) (external)
This should be called in order to relay a governance request to the GovernorSpoke
contract deployed to
the child chain associated with chainId
.
Only callable by the owner (presumably the UMA DVM Governor contract, on L1 Ethereum).
#
Parameters:- chainId: network that messenger contract will communicate with
- calls: the calls to be made by the GovernorSpoke. Should encode a
to
anddata
prop for each call.
multicall(bytes[] data) โ bytes[] results (external)
_preEntranceCheck() (internal)
_preEntranceSet() (internal)
_postEntranceReset() (internal)
constructor() (internal)
Initializes the contract setting the deployer as the initial owner.
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(uint256 chainId, address messenger, struct GovernorSpoke.Call[] calls, bytes dataSentToChild)
SetParentMessenger(uint256 chainId, address parentMessenger)
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.