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
Name | Type | Description |
---|---|---|
targets | address[] | Ordered list of targeted addresses |
signatures | string[] | Orderd list of function signatures to be called |
calldatas | bytes[] | Orderded list of calldata to be passed with each call |
description | string | Description of the governance |
Return Values
Name | Type | Description |
---|---|---|
[0] | uint256 | uint256 id of the proposal |
queue
Queue a proposal for execution
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 | id of the proposal to queue |
state
Get the state of a proposal
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 | id of the proposal |
Return Values
Name | Type | Description |
---|---|---|
[0] | enum Governor.ProposalState | ProposalState |
_queueOrRevert
execute
Execute a proposal.
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 | id of the proposal |
cancel
Cancel a proposal.
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 | id of the proposal |
getActions
Get the actions that a proposal will take.
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 | id of the proposal |