Voting Tokens

What is a Voting Token?

A voting token is a token that snapshots the number of votes for any given block number.
The exact interface is defined below:
1
interface IHasVotes {
2
​
3
function getCurrentVotes(address account) external view returns (uint96);
4
​
5
function getPriorVotes(address account, uint256 blockNumber)
6
external
7
view
8
returns (uint96);
9
}
Copied!
See: IHasVotes.sol for the interface code.

How can I create a voting token?

See POOF and UBE as examples for easily creating a voting token. Both these tokens are just implemented by constructing a TransferrableVotingToken.