Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split ERC20Votes and ERC20VotesComp #2706

Merged
merged 11 commits into from
Jun 4, 2021

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Jun 4, 2021

ERC20Votes include:

function delegates(address owner) external view returns (address);
function checkpoints(address account, uint32 pos) external view returns (Checkpoint memory);
function numCheckpoints(address account) external view returns (uint32);
function getVotes(address account) external view returns (uint256);
function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);
function getPastTotalSupply(uint256 blockNumber) external view returns(uint256);
function delegate(address delegatee) external;
function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) external;

ERC20VotesComp include all the the above plus:

function getCurrentVotes(address account) external view returns (uint96);
function getPriorVotes(address account, uint256 blockNumber) external view returns (uint96);

ERC20VotesComp will also override the total supply cap from 2224 (as in ERC20Votes) to 296

PR Checklist

  • Tests
  • Documentation
  • Changelog entry

@frangio frangio changed the title split ERC20Votes and ERC20VotesComp Split ERC20Votes and ERC20VotesComp Jun 4, 2021
Copy link
Contributor

@frangio frangio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a few changes, everything else looks good!

contracts/utils/math/SafeCast.sol Outdated Show resolved Hide resolved
contracts/utils/math/SafeCast.sol Show resolved Hide resolved
Co-authored-by: Francisco Giordano <[email protected]>
@frangio frangio merged commit e3661ab into OpenZeppelin:master Jun 4, 2021
@Amxx Amxx deleted the feature/erc20/erc20VotesComp branch June 4, 2021 17:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants