Tally Docs
Search…
Token contract
Compatibility considerations when implementing the token contract that will work with your governance.

Events signatures

1
event DelegateVotesChanged(
2
address indexed delegate,
3
uint previousBalance,
4
uint newBalance
5
);
6
event DelegateChanged(
7
address indexed delegator,
8
address indexed fromDelegate,
9
address indexed toDelegate
10
);
11
event Transfer(
12
address indexed from,
13
address indexed to,
14
uint256 amount
15
);
Copied!

Functions signatures

Your token contract should implement these functions, if you are using an ERC20 token, you can use the ERC20Votes or the ERC20VotesComp extensions from the OpenZeppelin library to add these to your contract.
If you're using an ERC71 you will need a custom implementation that uses the events signatures mentioned above and these functions signatures or do something similar to what Nouns DAO did with their ERC721Checkpointable contract.
1
function delegate(address delegatee)
2
function delegateBySig(
3
address delegatee,
4
uint nonce,
5
uint expiry,
6
uint8 v,
7
bytes32 r,
8
bytes32 s
9
)
10
function getVotes(address account) public view returns (uint256)
Copied!
Last modified 30d ago