Skip to main content

Governor

Governor​

proposalCount​

uint256 proposalCount

Proposal​

struct Proposal {
uint256 id;
address proposer;
uint256 eta;
address[] targets;
string[] signatures;
bytes[] calldatas;
bool executed;
}

proposals​

mapping(uint256 => struct Governor.Proposal) proposals

ProposalCreated​

event ProposalCreated(uint256 id, address proposer, address[] targets, string[] signatures, bytes[] calldatas, string description)

ProposalQueued​

event ProposalQueued(uint256 id, uint256 eta)

ProposalExecuted​

event ProposalExecuted(uint256 id)

ProposalCancelled​

event ProposalCancelled(uint256 id)

MAX_OPERATIONS​

uint256 MAX_OPERATIONS

ProposalState​

enum ProposalState {
Pending,
Queued,
Expired,
Executed
}

constructor​

propose​

Propose Governance call(s)

Parameters​

NameTypeDescription
targetsaddress[]Ordered list of targeted addresses
signaturesstring[]Orderd list of function signatures to be called
calldatasbytes[]Orderded list of calldata to be passed with each call
descriptionstringDescription of the governance

Return Values​

NameTypeDescription
[0]uint256uint256 id of the proposal

queue​

Queue a proposal for execution

Parameters​

NameTypeDescription
proposalIduint256id of the proposal to queue

state​

Get the state of a proposal

Parameters​

NameTypeDescription
proposalIduint256id of the proposal

Return Values​

NameTypeDescription
[0]enum Governor.ProposalStateProposalState

_queueOrRevert​

execute​

Execute a proposal.

Parameters​

NameTypeDescription
proposalIduint256id of the proposal

cancel​

Cancel a proposal.

Parameters​

NameTypeDescription
proposalIduint256id of the proposal

getActions​

Get the actions that a proposal will take.

Parameters​

NameTypeDescription
proposalIduint256id of the proposal