-
-
Save hayeah/2bfd185b94b1f16159a867f45995c982 to your computer and use it in GitHub Desktop.
This file contains 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
> encode_abi( | |
["uint256[][]"], | |
[[[0xa1, 0xa2, 0xa3], [0xb1, 0xb2, 0xb3], [0xc1, 0xc2, 0xc3]]] | |
).hex() | |
// arg1: The outter array is at position 0x20. | |
0000000000000000000000000000000000000000000000000000000000000020 | |
// Each element is the position of an inner array. | |
0000000000000000000000000000000000000000000000000000000000000003 | |
0000000000000000000000000000000000000000000000000000000000000060 | |
00000000000000000000000000000000000000000000000000000000000000e0 | |
0000000000000000000000000000000000000000000000000000000000000160 | |
// array[0] at 0x60 | |
0000000000000000000000000000000000000000000000000000000000000003 | |
00000000000000000000000000000000000000000000000000000000000000a1 | |
00000000000000000000000000000000000000000000000000000000000000a2 | |
00000000000000000000000000000000000000000000000000000000000000a3 | |
// array[1] at 0xe0 | |
0000000000000000000000000000000000000000000000000000000000000003 | |
00000000000000000000000000000000000000000000000000000000000000b1 | |
00000000000000000000000000000000000000000000000000000000000000b2 | |
00000000000000000000000000000000000000000000000000000000000000b3 | |
// array[2] at 0x160 | |
0000000000000000000000000000000000000000000000000000000000000003 | |
00000000000000000000000000000000000000000000000000000000000000c1 | |
00000000000000000000000000000000000000000000000000000000000000c2 | |
00000000000000000000000000000000000000000000000000000000000000c3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment