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

Optimize implementation of ERC20Capped #2524

Merged
merged 4 commits into from
Feb 24, 2021

Conversation

Amxx
Copy link
Collaborator

@Amxx Amxx commented Feb 15, 2021

Fixes #2523

PR Checklist

  • Tests
  • Changelog entry

* Requirements:
*
* - minted tokens must not cause the total supply to go over the cap.
* @dev See {ERC20-_mint}.
Copy link
Contributor

Choose a reason for hiding this comment

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

I edited the documentation to use this "See" format we've been useing so far.

@frangio frangio changed the title overload _mint in erc20capped instead of hooking to transfer Optimize implementation of ERC20Capped Feb 24, 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.

Looks good to me!

@frangio frangio enabled auto-merge (squash) February 24, 2021 22:04
@frangio frangio merged commit 36b8559 into OpenZeppelin:master Feb 24, 2021
@Amxx Amxx deleted the refactor/erc20cappedmint branch February 24, 2021 22:46
frangio pushed a commit that referenced this pull request Mar 1, 2021
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.

Check ERC20Capped in _mint instead of _beforeTokenTransfer to save gas on token transfers
2 participants