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

Remove hooks from ERC20 #3838

Merged
Merged
Changes from 1 commit
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
50db94a
remove beforeTokenTranser and afterTokenTransfer hooks
JulissaDantes Nov 24, 2022
2e68978
Update contracts using the hooks
JulissaDantes Nov 25, 2022
bdd94d1
ERC20Snapshot changes
JulissaDantes Nov 25, 2022
e03c773
Update ERC20Snapshot mock
JulissaDantes Nov 28, 2022
616c148
Update changelog
JulissaDantes Nov 28, 2022
c2d0313
update changelog
JulissaDantes Nov 28, 2022
a81f1a5
update documentation
JulissaDantes Nov 28, 2022
caf4374
Merge branch 'next-v5.0' into refactor/erc20/mint-burn-transfer
JulissaDantes Nov 29, 2022
4f3adcb
update documentation
JulissaDantes Nov 29, 2022
bbecd36
Merge branch 'refactor/erc20/mint-burn-transfer' of https://github.co…
JulissaDantes Nov 29, 2022
054777e
Post merge fix
JulissaDantes Nov 29, 2022
b3da557
Update ERC20Votes
JulissaDantes Nov 29, 2022
27c7090
add overflow test
JulissaDantes Nov 30, 2022
b4ab7c7
Update contracts/token/ERC20/ERC20.sol
JulissaDantes Dec 2, 2022
dcbc275
Update contracts/token/ERC20/ERC20.sol
JulissaDantes Dec 2, 2022
c3350bd
Update ERC20
JulissaDantes Dec 5, 2022
8565f15
Merge branch 'refactor/erc20/mint-burn-transfer' of https://github.co…
JulissaDantes Dec 5, 2022
a56afc4
update ERC20Capped
JulissaDantes Dec 5, 2022
3ec8abf
Add format
JulissaDantes Dec 5, 2022
4213df3
update revert reason
JulissaDantes Dec 5, 2022
0fc5d3a
run lint
JulissaDantes Dec 5, 2022
975ed99
add checks for external transfer calls
JulissaDantes Dec 5, 2022
00ed155
update ERC20Test
JulissaDantes Dec 5, 2022
0d74d66
Update changelog
JulissaDantes Dec 5, 2022
7110896
Update CHANGELOG
JulissaDantes Dec 5, 2022
4e09ef8
Update CHANGELOG.md
JulissaDantes Dec 9, 2022
ed853fa
Update CHANGELOG.md
JulissaDantes Dec 9, 2022
a2bc30c
Update CHANGELOG.md
JulissaDantes Dec 9, 2022
ed66c58
update test
JulissaDantes Dec 12, 2022
5e67170
update ERC20
JulissaDantes Dec 12, 2022
fe5abf4
Handle zero address parameters
JulissaDantes Dec 12, 2022
1083de9
Update CHANGELOG.md
JulissaDantes Dec 13, 2022
a7a9ff1
Update CHANGELOG.md
JulissaDantes Dec 14, 2022
d6fdf53
Update CHANGELOG.md
JulissaDantes Dec 14, 2022
5e0688b
Update contracts/token/ERC20/ERC20.sol
JulissaDantes Dec 14, 2022
b66eb88
Update contracts/token/ERC20/ERC20.sol
JulissaDantes Dec 14, 2022
d55e714
Update contracts/token/ERC20/ERC20.sol
JulissaDantes Dec 14, 2022
8abfed7
Update unchecked reason
JulissaDantes Dec 14, 2022
278c6d0
Update contracts/token/ERC20/ERC20.sol
JulissaDantes Dec 14, 2022
56e648a
Update ERC20.sol
JulissaDantes Dec 14, 2022
2fc018e
run lint
JulissaDantes Dec 14, 2022
fa58b35
Add unchecked comment
JulissaDantes Dec 14, 2022
58a28b9
Update CHANGELOG.md
frangio Dec 14, 2022
a6ce9e1
Update CHANGELOG.md
frangio Dec 14, 2022
ee4b86a
update mock
JulissaDantes Dec 14, 2022
fc25740
Merge branch 'refactor/erc20/mint-burn-transfer' of https://github.co…
JulissaDantes Dec 14, 2022
30876ac
update docs
frangio Dec 14, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add format
  • Loading branch information
JulissaDantes committed Dec 5, 2022
commit 3ec8abfc8862c96c8b99ba38036c097b06084139
4 changes: 2 additions & 2 deletions contracts/token/ERC20/extensions/ERC20Capped.sol
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ abstract contract ERC20Capped is ERC20 {
address to,
uint256 amount
) internal virtual override {
if(from == address(0)){
if (from == address(0)) {
require(ERC20.totalSupply() + amount <= cap(), "ERC20Capped: cap exceeded");
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the rational for using ERC20.totalSupply() instead of totalSupply() ?

}

super._transfer(from, to, amount);
}
}