GovernorAlpha
Functions
quorumVotes
function quorumVotes() public returns (uint256)
The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed
proposalThreshold
function proposalThreshold() public returns (uint256)
The number of votes required in order for a voter to become a proposer
proposalMaxOperations
function proposalMaxOperations() public returns (uint256)
The maximum number of actions that can be included in a proposal
votingDelay
function votingDelay() public returns (uint256)
The delay before voting on a proposal may take place, once proposed
votingPeriod
function votingPeriod() public returns (uint256)
The duration of voting on a proposal, in blocks
constructor
function constructor(
address timelock_,
address tribe_,
address guardian_
) public
Parameters
Name | Type | Description |
---|---|---|
timelock_ | address | |
tribe_ | address | |
guardian_ | address |
propose
function propose(
address[] targets,
uint256[] values,
string[] signatures,
bytes[] calldatas,
string description
) public returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
targets | address[] | |
values | uint256[] | |
signatures | string[] | |
calldatas | bytes[] | |
description | string |
queue
function queue(
uint256 proposalId
) public
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 |
_queueOrRevert
function _queueOrRevert(
address target,
uint256 value,
string signature,
bytes data,
uint256 eta
) internal
Parameters
Name | Type | Description |
---|---|---|
target | address | |
value | uint256 | |
signature | string | |
data | bytes | |
eta | uint256 |
execute
function execute(
uint256 proposalId
) public
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 |
cancel
function cancel(
uint256 proposalId
) public
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 |
getActions
function getActions(
uint256 proposalId
) public returns (address[] targets, uint256[] values, string[] signatures, bytes[] calldatas)
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 |
getReceipt
function getReceipt(
uint256 proposalId,
address voter
) public returns (struct GovernorAlpha.Receipt)
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 | |
voter | address |
state
function state(
uint256 proposalId
) public returns (enum GovernorAlpha.ProposalState)
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 |
castVote
function castVote(
uint256 proposalId,
bool support
) public
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 | |
support | bool |
castVoteBySig
function castVoteBySig(
uint256 proposalId,
bool support,
uint8 v,
bytes32 r,
bytes32 s
) public
Parameters
Name | Type | Description |
---|---|---|
proposalId | uint256 | |
support | bool | |
v | uint8 | |
r | bytes32 | |
s | bytes32 |
_castVote
function _castVote(
address voter,
uint256 proposalId,
bool support
) internal
Parameters
Name | Type | Description |
---|---|---|
voter | address | |
proposalId | uint256 | |
support | bool |
__acceptAdmin
function __acceptAdmin() public
__abdicate
function __abdicate() public
__transferGuardian
function __transferGuardian(
address newGuardian
) public
Parameters
Name | Type | Description |
---|---|---|
newGuardian | address |
__queueSetTimelockPendingAdmin
function __queueSetTimelockPendingAdmin(
address newPendingAdmin,
uint256 eta
) public
Parameters
Name | Type | Description |
---|---|---|
newPendingAdmin | address | |
eta | uint256 |
__executeSetTimelockPendingAdmin
function __executeSetTimelockPendingAdmin(
address newPendingAdmin,
uint256 eta
) public
Parameters
Name | Type | Description |
---|---|---|
newPendingAdmin | address | |
eta | uint256 |
add256
function add256(
uint256 a,
uint256 b
) internal returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 |
sub256
function sub256(
uint256 a,
uint256 b
) internal returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
a | uint256 | |
b | uint256 |
getChainId
function getChainId() internal returns (uint256)
Events
ProposalCreated
event ProposalCreated(
uint256 id,
address proposer,
address[] targets,
uint256[] values,
string[] signatures,
bytes[] calldatas,
uint256 startBlock,
uint256 endBlock,
string description
)
An event emitted when a new proposal is created
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | |
proposer | address | |
targets | address[] | |
values | uint256[] | |
signatures | string[] | |
calldatas | bytes[] | |
startBlock | uint256 | |
endBlock | uint256 | |
description | string |
VoteCast
event VoteCast(
address voter,
uint256 proposalId,
bool support,
uint256 votes
)
An event emitted when a vote has been cast on a proposal
Parameters
Name | Type | Description |
---|---|---|
voter | address | |
proposalId | uint256 | |
support | bool | |
votes | uint256 |
ProposalCanceled
event ProposalCanceled(
uint256 id
)
An event emitted when a proposal has been canceled
Parameters
Name | Type | Description |
---|---|---|
id | uint256 |
ProposalQueued
event ProposalQueued(
uint256 id,
uint256 eta
)
An event emitted when a proposal has been queued in the Timelock
Parameters
Name | Type | Description |
---|---|---|
id | uint256 | |
eta | uint256 |
ProposalExecuted
event ProposalExecuted(
uint256 id
)
An event emitted when a proposal has been executed in the Timelock
Parameters
Name | Type | Description |
---|---|---|
id | uint256 |
TimelockInterface
Functions
delay
function delay() external returns (uint256)
GRACE_PERIOD
function GRACE_PERIOD() external returns (uint256)
acceptAdmin
function acceptAdmin() external
queuedTransactions
function queuedTransactions(
bytes32 hash
) external returns (bool)
Parameters
Name | Type | Description |
---|---|---|
hash | bytes32 |
queueTransaction
function queueTransaction(
address target,
uint256 value,
string signature,
bytes data,
uint256 eta
) external returns (bytes32)
Parameters
Name | Type | Description |
---|---|---|
target | address | |
value | uint256 | |
signature | string | |
data | bytes | |
eta | uint256 |
cancelTransaction
function cancelTransaction(
address target,
uint256 value,
string signature,
bytes data,
uint256 eta
) external
Parameters
Name | Type | Description |
---|---|---|
target | address | |
value | uint256 | |
signature | string | |
data | bytes | |
eta | uint256 |
executeTransaction
function executeTransaction(
address target,
uint256 value,
string signature,
bytes data,
uint256 eta
) external returns (bytes)
Parameters
Name | Type | Description |
---|---|---|
target | address | |
value | uint256 | |
signature | string | |
data | bytes | |
eta | uint256 |
TribeInterface
Functions
getPriorVotes
function getPriorVotes(
address account,
uint256 blockNumber
) external returns (uint96)
Parameters
Name | Type | Description |
---|---|---|
account | address | |
blockNumber | uint256 |