ERC20VotesHarness.sol 1.0 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import "../munged/token/ERC20/extensions/ERC20Votes.sol";
  2. contract ERC20VotesHarness is ERC20Votes {
  3. constructor(string memory name, string memory symbol) ERC20Permit(name) ERC20(name, symbol) {}
  4. function ckptFromBlock(address account, uint32 pos) public view returns (uint32) {
  5. return _checkpoints[account][pos].fromBlock;
  6. }
  7. function ckptVotes(address account, uint32 pos) public view returns (uint224) {
  8. return _checkpoints[account][pos].fromBlock;
  9. }
  10. function mint(address account, uint256 amount) public {
  11. _mint(account, amount);
  12. }
  13. function burn(address account, uint256 amount) public {
  14. _burn(account, amount);
  15. }
  16. function unsafeNumCheckpoints(address account) public view returns (uint256) {
  17. return _checkpoints[account].length;
  18. }
  19. function delegateBySig(
  20. address delegatee,
  21. uint256 nonce,
  22. uint256 expiry,
  23. uint8 v,
  24. bytes32 r,
  25. bytes32 s
  26. ) public virtual override { }
  27. }