Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Remove hooks from ERC20 #3838
Changes from 13 commits
50db94a
2e68978
bdd94d1
e03c773
616c148
c2d0313
a81f1a5
caf4374
4f3adcb
bbecd36
054777e
b3da557
27c7090
b4ab7c7
dcbc275
c3350bd
8565f15
a56afc4
3ec8abf
4213df3
0fc5d3a
975ed99
00ed155
0d74d66
7110896
4e09ef8
ed853fa
a2bc30c
ed66c58
5e67170
fe5abf4
1083de9
a7a9ff1
d6fdf53
5e0688b
b66eb88
d55e714
8abfed7
278c6d0
56e648a
2fc018e
fa58b35
58a28b9
a6ce9e1
ee4b86a
fc25740
30876ac
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this part will not work properly if update from 0 to 0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since everything goes through the transfer, it cannot know if its coming from mint or burn, so
transfer
has a check to ensure thatfrom
andto
cannot be the zero address, but if a user sends a mint to address zero it would received bothfrom
andto
as the zero address. There is a test for that case on ln 206There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 206 is testing that you cannot mint to address 0. That is a valid test, but its separate from this. This tests that you cannot call transfer to the address 0.
Tests are checking for behavior correctness. Its ok (and I think its needed) to have multiple tests that are resolved by the same require in different context.
I think this test should have been kept.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if that is the cause of the coverage decrease.