Skip to main content

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

NameTypeDescription
timelock_address
tribe_address
guardian_address

propose

function propose(
address[] targets,
uint256[] values,
string[] signatures,
bytes[] calldatas,
string description
) public returns (uint256)

Parameters

NameTypeDescription
targetsaddress[]
valuesuint256[]
signaturesstring[]
calldatasbytes[]
descriptionstring

queue

function queue(
uint256 proposalId
) public

Parameters

NameTypeDescription
proposalIduint256

_queueOrRevert

function _queueOrRevert(
address target,
uint256 value,
string signature,
bytes data,
uint256 eta
) internal

Parameters

NameTypeDescription
targetaddress
valueuint256
signaturestring
databytes
etauint256

execute

function execute(
uint256 proposalId
) public

Parameters

NameTypeDescription
proposalIduint256

cancel

function cancel(
uint256 proposalId
) public

Parameters

NameTypeDescription
proposalIduint256

getActions

function getActions(
uint256 proposalId
) public returns (address[] targets, uint256[] values, string[] signatures, bytes[] calldatas)

Parameters

NameTypeDescription
proposalIduint256

getReceipt

function getReceipt(
uint256 proposalId,
address voter
) public returns (struct GovernorAlpha.Receipt)

Parameters

NameTypeDescription
proposalIduint256
voteraddress

state

function state(
uint256 proposalId
) public returns (enum GovernorAlpha.ProposalState)

Parameters

NameTypeDescription
proposalIduint256

castVote

function castVote(
uint256 proposalId,
bool support
) public

Parameters

NameTypeDescription
proposalIduint256
supportbool

castVoteBySig

function castVoteBySig(
uint256 proposalId,
bool support,
uint8 v,
bytes32 r,
bytes32 s
) public

Parameters

NameTypeDescription
proposalIduint256
supportbool
vuint8
rbytes32
sbytes32

_castVote

function _castVote(
address voter,
uint256 proposalId,
bool support
) internal

Parameters

NameTypeDescription
voteraddress
proposalIduint256
supportbool

__acceptAdmin

function __acceptAdmin() public

__abdicate

function __abdicate() public

__transferGuardian

function __transferGuardian(
address newGuardian
) public

Parameters

NameTypeDescription
newGuardianaddress

__queueSetTimelockPendingAdmin

function __queueSetTimelockPendingAdmin(
address newPendingAdmin,
uint256 eta
) public

Parameters

NameTypeDescription
newPendingAdminaddress
etauint256

__executeSetTimelockPendingAdmin

function __executeSetTimelockPendingAdmin(
address newPendingAdmin,
uint256 eta
) public

Parameters

NameTypeDescription
newPendingAdminaddress
etauint256

add256

function add256(
uint256 a,
uint256 b
) internal returns (uint256)

Parameters

NameTypeDescription
auint256
buint256

sub256

function sub256(
uint256 a,
uint256 b
) internal returns (uint256)

Parameters

NameTypeDescription
auint256
buint256

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

NameTypeDescription
iduint256
proposeraddress
targetsaddress[]
valuesuint256[]
signaturesstring[]
calldatasbytes[]
startBlockuint256
endBlockuint256
descriptionstring

VoteCast

event VoteCast(
address voter,
uint256 proposalId,
bool support,
uint256 votes
)

An event emitted when a vote has been cast on a proposal

Parameters

NameTypeDescription
voteraddress
proposalIduint256
supportbool
votesuint256

ProposalCanceled

event ProposalCanceled(
uint256 id
)

An event emitted when a proposal has been canceled

Parameters

NameTypeDescription
iduint256

ProposalQueued

event ProposalQueued(
uint256 id,
uint256 eta
)

An event emitted when a proposal has been queued in the Timelock

Parameters

NameTypeDescription
iduint256
etauint256

ProposalExecuted

event ProposalExecuted(
uint256 id
)

An event emitted when a proposal has been executed in the Timelock

Parameters

NameTypeDescription
iduint256

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

NameTypeDescription
hashbytes32

queueTransaction

function queueTransaction(
address target,
uint256 value,
string signature,
bytes data,
uint256 eta
) external returns (bytes32)

Parameters

NameTypeDescription
targetaddress
valueuint256
signaturestring
databytes
etauint256

cancelTransaction

function cancelTransaction(
address target,
uint256 value,
string signature,
bytes data,
uint256 eta
) external

Parameters

NameTypeDescription
targetaddress
valueuint256
signaturestring
databytes
etauint256

executeTransaction

function executeTransaction(
address target,
uint256 value,
string signature,
bytes data,
uint256 eta
) external returns (bytes)

Parameters

NameTypeDescription
targetaddress
valueuint256
signaturestring
databytes
etauint256

TribeInterface

Functions

getPriorVotes

function getPriorVotes(
address account,
uint256 blockNumber
) external returns (uint96)

Parameters

NameTypeDescription
accountaddress
blockNumberuint256