IVotes
Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. Available since v4.5.
Methods
delegate
Delegates votes from the sender to delegatee
.
Parameters
delegatee
address
undefined
delegateBySig
Delegates votes from signer to delegatee
.
Parameters
delegatee
address
undefined
nonce
uint256
undefined
expiry
uint256
undefined
v
uint8
undefined
r
bytes32
undefined
s
bytes32
undefined
delegates
Returns the delegate that account
has chosen.
Parameters
account
address
undefined
Returns
_0
address
undefined
getPastTotalSupply
Returns the total supply of votes available at the end of a past block (blockNumber
). NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. Votes that have not been delegated are still part of total supply, even though they would not participate in a vote.
Parameters
blockNumber
uint256
undefined
Returns
_0
uint256
undefined
getPastVotes
Returns the amount of votes that account
had at the end of a past block (blockNumber
).
Parameters
account
address
undefined
blockNumber
uint256
undefined
Returns
_0
uint256
undefined
getVotes
Returns the current amount of votes that account
has.
Parameters
account
address
undefined
Returns
_0
uint256
undefined
Events
DelegateChanged
Emitted when an account changes their delegate.
Parameters
delegator indexed
address
undefined
fromDelegate indexed
address
undefined
toDelegate indexed
address
undefined
DelegateVotesChanged
Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.
Parameters
delegate indexed
address
undefined
previousBalance
uint256
undefined
newBalance
uint256
undefined
Last updated