IERC5805
Inherits: IStatefulERC712, IERC6372
Author: M^0 Labs
The interface as defined by EIP-5805: https://eips.ethereum.org/EIPS/eip-5805
Functions
delegate
Allows a calling account to change its voting power delegation to delegatee
.
Parameters
delegatee
address
The address of the account the caller's voting power will be delegated to.
delegateBySig
Changes the signing account's voting power delegation to delegatee
.
Parameters
delegatee
address
The address of the account the signing account's voting power will be delegated to.
nonce
uint256
The nonce of the account delegating.
expiry
uint256
The timestamp until which the signature is still valid.
v
uint8
A signature parameter.
r
bytes32
A signature parameter.
s
bytes32
A signature parameter.
DELEGATION_TYPEHASH
Returns the EIP712 typehash used in the encoding of the digest for the delegateBySig function.
delegates
Returns the delegatee the voting power of account
is delegated to.
Parameters
account
address
The address of the account that can delegate its voting power.
Returns
<none>
address
The address of the account the voting power of account
will be delegated to.
getPastVotes
Returns the total voting power of account
at a past clock value timepoint
.
Parameters
account
address
The address of some account.
timepoint
uint256
The point in time, according to the clock mode the contract is operating on.
Returns
<none>
uint256
The total voting power of account
at clock value timepoint
.
getVotes
Returns the total voting power of account
.
Parameters
account
address
The address of some account.
Returns
<none>
uint256
The total voting power of account
.
Events
DelegateChanged
Emitted when delegator
changes its voting power delegation from fromDelegatee
to toDelegatee
.
Parameters
delegator
address
The address of the account changing its voting power delegation.
fromDelegatee
address
The previous account the voting power of delegator
was delegated to.
toDelegatee
address
The new account the voting power of delegator
is delegated to.
DelegateVotesChanged
Emitted when the available voting power of delegatee
changes from previousBalance
to newBalance
.
Parameters
delegatee
address
The address of the account whose voting power is changed.
previousBalance
uint256
The previous voting power of delegatee
.
newBalance
uint256
The new voting power of delegatee
.
Errors
NotPastTimepoint
Revert message when a query for past values is for a timepoint greater or equal to the current clock.
Parameters
timepoint
uint48
The timepoint being queried.
clock
uint48
The current timepoint.