OmnichainGovernanceExecutor
OmnichainGovernanceExecutor
Section titled “OmnichainGovernanceExecutor”OmnichainGovernanceExecutor at v2.15.0 receives LayerZero V1 messages from the trusted BNB sender, queues each route through its destination TimelockV8, and permits permissionless execution after the timelock ETA. Only the configured guardian can cancel a queued remote proposal.
The deployed surface also inherits LayerZero configuration, trusted-remote, failed-message, pause, ownership, and receive-limit selectors from NonblockingLzApp and BaseOmnichainControllerDest. Administrative calls normally pass through OmnichainExecutorOwner; do not infer direct caller authority from public ABI presence.
Solidity API
Section titled “Solidity API”enum ProposalType { NORMAL, FASTTRACK, CRITICAL}struct Proposal { uint256 id; uint256 eta; address[] targets; uint256[] values; string[] signatures; bytes[] calldatas; bool canceled; bool executed; uint8 proposalType;}enum ProposalState { Canceled, Queued, Executed}guardian
Section titled “guardian”A privileged role that can cancel any proposal
address guardiansrcChainId
Section titled “srcChainId”Stores BNB chain layerzero endpoint id
uint16 srcChainIdlastProposalReceived
Section titled “lastProposalReceived”Last proposal count received
uint256 lastProposalReceivedproposals
Section titled “proposals”The official record of all proposals ever proposed
mapping(uint256 => struct OmnichainGovernanceExecutor.Proposal) proposalsproposalTimelocks
Section titled “proposalTimelocks”Mapping containing Timelock addresses for each proposal type
mapping(uint256 => contract ITimelock) proposalTimelocksqueued
Section titled “queued”Represents queue state of proposal
mapping(uint256 => bool) queuedsetSrcChainId
Section titled “setSrcChainId”Update source layerzero endpoint id
function setSrcChainId(uint16 srcChainId_) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| srcChainId_ | uint16 | The new source chain id to be set |
📅 Events
Section titled “📅 Events”- Emit SetSrcChainId with old and new source id
⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Only owner
setGuardian
Section titled “setGuardian”Sets the new executor guardian
function setGuardian(address newGuardian) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| newGuardian | address | The address of the new guardian |
📅 Events
Section titled “📅 Events”- Emit NewGuardian with old and new guardian address
⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Must be call by guardian or owner
addTimelocks
Section titled “addTimelocks”Add timelocks to the ProposalTimelocks mapping
function addTimelocks(contract ITimelock[] timelocks_) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| timelocks_ | contract ITimelock[] | Array of addresses of all 3 timelocks |
📅 Events
Section titled “📅 Events”- Emits TimelockAdded with old and new timelock and route type
⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Only owner
execute
Section titled “execute”Executes a queued proposal if eta has passed
function execute(uint256 proposalId_) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| proposalId_ | uint256 | Id of proposal that is to be executed |
📅 Events
Section titled “📅 Events”- Emits ProposalExecuted with proposal id of executed proposal
cancel
Section titled “cancel”Cancels a proposal only if sender is the guardian and proposal is not executed
function cancel(uint256 proposalId_) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| proposalId_ | uint256 | Id of proposal that is to be canceled |
📅 Events
Section titled “📅 Events”- Emits ProposalCanceled with proposal id of the canceled proposal
⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Sender must be the guardian
setTimelockPendingAdmin
Section titled “setTimelockPendingAdmin”Sets the new pending admin of the Timelock
function setTimelockPendingAdmin(address pendingAdmin_, uint8 proposalType_) externalParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| pendingAdmin_ | address | Address of new pending admin |
| proposalType_ | uint8 | Type of proposal |
📅 Events
Section titled “📅 Events”- Emits SetTimelockPendingAdmin with new pending admin and proposal type
⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Only owner
retryMessage
Section titled “retryMessage”Resends a previously failed message
function retryMessage(uint16 srcChainId_, bytes srcAddress_, uint64 nonce_, bytes payload_) public payableParameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| srcChainId_ | uint16 | Source chain Id |
| srcAddress_ | bytes | Source address => local app address + remote app address |
| nonce_ | uint64 | Nonce to identify failed message |
| payload_ | bytes | The payload of the message to be retried |
⛔️ Access Requirements
Section titled “⛔️ Access Requirements”- Only owner
Gets the state of a proposal
function state(uint256 proposalId_) public view returns (enum OmnichainGovernanceExecutor.ProposalState)Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
| proposalId_ | uint256 | The id of the proposal |
Return Values
Section titled “Return Values”| Name | Type | Description |
|---|---|---|
| [0] | enum OmnichainGovernanceExecutor.ProposalState | Proposal state |