Skip to content

Optimize implementation of ERC20Capped#2524

Merged
frangio merged 4 commits into
OpenZeppelin:masterfrom
Amxx:refactor/erc20cappedmint
Feb 24, 2021
Merged

Optimize implementation of ERC20Capped#2524
frangio merged 4 commits into
OpenZeppelin:masterfrom
Amxx:refactor/erc20cappedmint

Conversation

@Amxx

@Amxx Amxx commented Feb 15, 2021

Copy link
Copy Markdown
Collaborator

Fixes #2523

PR Checklist

  • Tests
  • Changelog entry

Comment thread contracts/token/ERC20/ERC20Capped.sol Outdated
Amxx and others added 3 commits February 23, 2021 00:28
@Amxx Amxx force-pushed the refactor/erc20cappedmint branch from 9256854 to 646b976 Compare February 22, 2021 23:28
* Requirements:
*
* - minted tokens must not cause the total supply to go over the cap.
* @dev See {ERC20-_mint}.

Copy link
Copy Markdown
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

@frangio frangio left a comment

Copy link
Copy Markdown
Contributor

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