perf: return onERC1155Received selector without shifting#151
perf: return onERC1155Received selector without shifting#151wjmelements wants to merge 4 commits into
Conversation
| 0xf23a6e61 0x00 mstore // [] | ||
| 0x20 0x1c return // [] |
There was a problem hiding this comment.
I also want to try msize instead of 0x20
There was a problem hiding this comment.
revert that commit if CI fails
There was a problem hiding this comment.
msize uses less codesize and execution gas than push1
There was a problem hiding this comment.
I'd add the small note that unlike the original version this makes assumptions about surrounding memory (that 0x20..0x3c is zeroed)
There was a problem hiding this comment.
I'd add the small note that unlike the original version this makes assumptions about surrounding memory (that
0x20..0x3cis zeroed)
|
I have attached erc1155.tar.gz, which demonstrates (using a dio config) that if both approaches are allowed to use |
Reviewer @Maddiaa0
CC @kadenzipfel
Changes