OmnichainGovernanceExecutor

OmnichainGovernanceExecutor

Executes the proposal transactions sent from the main chain

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;
}

guardian

A privileged role that can cancel any proposal


srcChainId

Stores BNB chain layerzero endpoint id


lastProposalReceived

Last proposal count received


proposals

The official record of all proposals ever proposed


proposalTimelocks

Mapping containing Timelock addresses for each proposal type


queued

Represents queue state of proposal


setSrcChainId

Update source layerzero endpoint id

Parameters

Name
Type
Description

srcChainId_

uint16

The new source chain id to be set

📅 Events

  • Emit SetSrcChainId with old and new source id

⛔️ Access Requirements

  • Only owner


setGuardian

Sets the new executor guardian

Parameters

Name
Type
Description

newGuardian

address

The address of the new guardian

📅 Events

  • Emit NewGuardian with old and new guardian address

⛔️ Access Requirements

  • Must be call by guardian or owner


addTimelocks

Add timelocks to the ProposalTimelocks mapping

Parameters

Name
Type
Description

timelocks_

contract ITimelock[]

Array of addresses of all 3 timelocks

📅 Events

  • Emits TimelockAdded with old and new timelock and route type

⛔️ Access Requirements

  • Only owner


execute

Executes a queued proposal if eta has passed

Parameters

Name
Type
Description

proposalId_

uint256

Id of proposal that is to be executed

📅 Events

  • Emits ProposalExecuted with proposal id of executed proposal


cancel

Cancels a proposal only if sender is the guardian and proposal is not executed

Parameters

Name
Type
Description

proposalId_

uint256

Id of proposal that is to be canceled

📅 Events

  • Emits ProposalCanceled with proposal id of the canceled proposal

⛔️ Access Requirements

  • Sender must be the guardian


setTimelockPendingAdmin

Sets the new pending admin of the Timelock

Parameters

Name
Type
Description

pendingAdmin_

address

Address of new pending admin

proposalType_

uint8

Type of proposal

📅 Events

  • Emits SetTimelockPendingAdmin with new pending admin and proposal type

⛔️ Access Requirements

  • Only owner


retryMessage

Resends a previously failed message

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

  • Only owner


state

Gets the state of a proposal

Parameters

Name
Type
Description

proposalId_

uint256

The id of the proposal

Return Values

Name
Type
Description

[0]

enum OmnichainGovernanceExecutor.ProposalState

Proposal state


Last updated