Last active
August 22, 2022 23:53
-
-
Save stong/6e49edc8a64eac16cd51043ac3143f68 to your computer and use it in GitHub Desktop.
EVM universal 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
cast rpc eth_sendTransaction '{"data": "'$(cat constructor_bytecode.txt)$(cat bytecode.txt)'"}' |
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
0x600D380380600D6000396000F3 |
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
00: 60 0D ; push 0x0D (size of deployer code) | |
02: 38 ; codesize | |
03: 03 ; sub (top of stack is now size of code to deploy) | |
04: 80 ; dup1 | |
05: 60 0D ; push 0x0D (size of deployer code) | |
07: 60 00 ; push 0 (codecopy dst offset) | |
09: 39 ; codecopy (0, 0x0d, codesize-0x0d) | |
0A: 60 00 ; push 0 (return mem offset) | |
0C: F3 ; ret (0, codesize-0x0d) | |
0D: rest of your bytecode goes here |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment