-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06234f9
commit 03ab532
Showing
2 changed files
with
45 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity ^0.8.20; | ||
|
||
interface IDelegates { | ||
/** | ||
* @dev The signature used has expired. | ||
*/ | ||
error DelegatesExpiredSignature(uint256 expiry); | ||
|
||
/** | ||
* @dev Emitted when an account changes their delegate. | ||
*/ | ||
event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); | ||
|
||
/** | ||
* @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of voting units. | ||
*/ | ||
event DelegateVotesChanged(address indexed delegate, uint256 previousVotes, uint256 newVotes); | ||
|
||
/** | ||
* @dev Returns the current amount of votes that `account` has. | ||
*/ | ||
function getVotes(address account) external view returns (uint256); | ||
|
||
/** | ||
* @dev Returns the delegate that `account` has chosen. | ||
*/ | ||
function delegates(address account) external view returns (address); | ||
|
||
/** | ||
* @dev Delegates votes from the sender to `delegatee`. | ||
*/ | ||
function delegate(address delegatee) external; | ||
|
||
/** | ||
* @dev Delegates votes from signer to `delegatee`. | ||
*/ | ||
function delegateBySig(address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s) external; | ||
} |