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
Name | Type | Description |
---|---|---|
|
| 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
Name | Type | Description |
---|---|---|
|
| The address of the account the signing account's voting power will be delegated to. |
|
| The nonce of the account delegating. |
|
| The timestamp until which the signature is still valid. |
|
| A signature parameter. |
|
| A signature parameter. |
|
| 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
Name | Type | Description |
---|---|---|
|
| The address of the account that can delegate its voting power. |
Returns
Name | Type | Description |
---|---|---|
|
| The address of the account the voting power of |
getPastVotes
Returns the total voting power of account
at a past clock value timepoint
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of some account. |
|
| The point in time, according to the clock mode the contract is operating on. |
Returns
Name | Type | Description |
---|---|---|
|
| The total voting power of |
getVotes
Returns the total voting power of account
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of some account. |
Returns
Name | Type | Description |
---|---|---|
|
| The total voting power of |
Events
DelegateChanged
Emitted when delegator
changes its voting power delegation from fromDelegatee
to toDelegatee
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the account changing its voting power delegation. |
|
| The previous account the voting power of |
|
| The new account the voting power of |
DelegateVotesChanged
Emitted when the available voting power of delegatee
changes from previousBalance
to newBalance
.
Parameters
Name | Type | Description |
---|---|---|
|
| The address of the account whose voting power is changed. |
|
| The previous voting power of |
|
| The new voting power of |
Errors
NotPastTimepoint
Revert message when a query for past values is for a timepoint greater or equal to the current clock.
Parameters
Name | Type | Description |
---|---|---|
|
| The timepoint being queried. |
|
| The current timepoint. |