WIP: Incoporate learnings into a new iteration of AllowanceHolder#246
Draft
duncancmt wants to merge 32 commits into
Draft
WIP: Incoporate learnings into a new iteration of AllowanceHolder#246duncancmt wants to merge 32 commits into
duncancmt wants to merge 32 commits into
Conversation
…ons prettier in block explorers
…Cancun and non-Cancun versions)
Closed
4c54af8 to
1444d8c
Compare
…is omitted if there is no selector
e1Ru1o
reviewed
Aug 5, 2025
e1Ru1o
reviewed
Aug 5, 2025
| mstore(add(0x24, testData), target) | ||
| mstore(add(0x10, testData), 0x70a08231000000000000000000000000) | ||
| mstore(testData, 0x24) | ||
| mstore(0x40, add(0x60, testData)) |
Member
There was a problem hiding this comment.
Are you doing 0x60 to keep the memory alignment?
Member
There was a problem hiding this comment.
Still wondering why not
Suggested change
| mstore(0x40, add(0x60, testData)) | |
| mstore(0x40, add(0x44, testData)) |
e1Ru1o
reviewed
Aug 5, 2025
Comment on lines
+210
to
+216
| // Pad `returndata` to a multiple of 32 bytes. | ||
| let len := mload(result) | ||
| let m := and(0x1f, len) | ||
| if m { | ||
| mstore(add(add(0x20, result), len), 0x00) | ||
| len := add(sub(0x20, m), len) | ||
| } |
Member
There was a problem hiding this comment.
what made you add this padding here?
e1Ru1o
reviewed
Aug 5, 2025
| target := calldataload(add(0x04, data.offset)) | ||
| // `shl(0x08, data.length)` can't overflow because we're going to | ||
| // `calldatacopy(..., data.length)` later. It would OOG. | ||
| let mask := shr(shl(0x08, sub(data.length, 0x04)), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) |
Member
There was a problem hiding this comment.
Shouldn't this be mul? or shr(0x03, ...)
Suggested change
| let mask := shr(shl(0x08, sub(data.length, 0x04)), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) | |
| let mask := shr(mul(0x08, sub(data.length, 0x04)), 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) |
Collaborator
Author
There was a problem hiding this comment.
Yeah it should be shl(0x03, ...)
b8e3001 to
af9b948
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.