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
| // This is the main file that will be compiled | |
| /* Imports */ | |
| #include "./ERC20.huff" | |
| #include "./utils/Ownable.huff" | |
| #define macro CONSTRUCTOR() = takes (0) returns (0) { | |
| OWNABLE_CONSTRUCTOR() | |
| ERC20_CONSTRUCTOR() | |
| } |
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
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.8.3; | |
| /* | |
| Pasting this code into evm.codes playground and stepping through will show that starting on instruction 1d, the | |
| JUMPDEST of the target function (which is 36) is pushed onto the stack. Then there is a SHL(20) performed on it. | |
| Then it's ORed with 00b4 so 36 becomes 36000000b4. | |
| Then later in step 47, when myFunc() calls targetFunc(), it does a SHR(20) to convert 36000000b4 back to 36 which | |
| it then uses for the JUMPDEST to targetFunc(). Nothing is ever done with the 000000b4 part. A copy of the full |
NewerOlder