OmnichainProposalSender
OmnichainProposalSender
OmnichainProposalSender contract builds upon the functionality of its parent contract , BaseOmnichainControllerSrc It sends a proposal's data to remote chains for execution after the proposal passes on the main chain when used with GovernorBravo, the owner of this contract must be set to the Timelock contract
Solidity API
proposalCount
Stores the total number of remote proposals
storedExecutionHashes
Execution hashes of failed messages
LZ_ENDPOINT
LayerZero endpoint for sending messages to remote chains
trustedRemoteLookup
Specifies the allowed path for sending messages (remote chainId => remote app address + local app address)
estimateFees
Estimates LayerZero fees for cross-chain message delivery to the remote chain
Parameters
remoteChainId_
uint16
The LayerZero id of a remote chain
payload_
bytes
The payload to be sent to the remote chain. It's computed as follows: payload = abi.encode(abi.encode(targets, values, signatures, calldatas, proposalType), pId)
useZro_
bool
Bool that indicates whether to pay in ZRO tokens or not
adapterParams_
bytes
The params used to specify the custom amount of gas required for the execution on the destination
Return Values
[0]
uint256
nativeFee The amount of fee in the native gas token (e.g. ETH)
[1]
uint256
zroFee The amount of fee in ZRO token
removeTrustedRemote
Remove trusted remote from storage
Parameters
remoteChainId_
uint16
The chain's id corresponds to setting the trusted remote to empty
📅 Events
Emit TrustedRemoteRemoved with remote chain id
⛔️ Access Requirements
Controlled by Access Control Manager
execute
Sends a message to execute a remote proposal
Parameters
remoteChainId_
uint16
The LayerZero id of the remote chain
payload_
bytes
The payload to be sent to the remote chain It's computed as follows: payload = abi.encode(targets, values, signatures, calldatas, proposalType)
adapterParams_
bytes
The params used to specify the custom amount of gas required for the execution on the destination
zroPaymentAddress_
address
The address of the ZRO token holder who would pay for the transaction. This must be either address(this) or tx.origin
📅 Events
Emits ExecuteRemoteProposal with remote chain id, proposal ID and payload on success
Emits StorePayload with last stored payload proposal ID ,remote chain id , payload, adapter params , values and reason for failure
⛔️ Access Requirements
Controlled by Access Control Manager
retryExecute
Resends a previously failed message
Parameters
pId_
uint256
The proposal ID to identify a failed message
remoteChainId_
uint16
The LayerZero id of the remote chain
payload_
bytes
The payload to be sent to the remote chain It's computed as follows: payload = abi.encode(abi.encode(targets, values, signatures, calldatas, proposalType), pId)
adapterParams_
bytes
The params used to specify the custom amount of gas required for the execution on the destination
zroPaymentAddress_
address
The address of the ZRO token holder who would pay for the transaction.
originalValue_
uint256
The msg.value passed when execute() function was called
📅 Events
Emits ClearPayload with proposal ID and hash
⛔️ Access Requirements
Controlled by Access Control Manager
fallbackWithdraw
Clear previously failed message
Parameters
to_
address
Address of the receiver
pId_
uint256
The proposal ID to identify a failed message
remoteChainId_
uint16
The LayerZero id of the remote chain
payload_
bytes
The payload to be sent to the remote chain It's computed as follows: payload = abi.encode(abi.encode(targets, values, signatures, calldatas, proposalType), pId)
adapterParams_
bytes
The params used to specify the custom amount of gas required for the execution on the destination
originalValue_
uint256
The msg.value passed when execute() function was called
📅 Events
Emits ClearPayload with proposal ID and hash
Emits FallbackWithdraw with receiver and amount
⛔️ Access Requirements
Only owner
setTrustedRemoteAddress
Sets the remote message receiver address
Parameters
remoteChainId_
uint16
The LayerZero id of a remote chain
newRemoteAddress_
bytes
The address of the contract on the remote chain to receive messages sent by this contract
📅 Events
Emits SetTrustedRemoteAddress with remote chain Id and remote address
⛔️ Access Requirements
Controlled by AccessControlManager
setConfig
Sets the configuration of the LayerZero messaging library of the specified version
Parameters
version_
uint16
Messaging library version
chainId_
uint16
The LayerZero chainId for the pending config change
configType_
uint256
The type of configuration. Every messaging library has its own convention
config_
bytes
The configuration in bytes. It can encode arbitrary content
⛔️ Access Requirements
Controlled by AccessControlManager
setSendVersion
Sets the configuration of the LayerZero messaging library of the specified version
Parameters
version_
uint16
New messaging library version
⛔️ Access Requirements
Controlled by AccessControlManager
getConfig
Gets the configuration of the LayerZero messaging library of the specified version
Parameters
version_
uint16
Messaging library version
chainId_
uint16
The LayerZero chainId
configType_
uint256
Type of configuration. Every messaging library has its own convention
Last updated