Skip to content

Instantly share code, notes, and snippets.

@hayeah

hayeah/block24. Secret

Created September 3, 2017 10:30
Show Gist options
  • Save hayeah/0ece4a779a11689f09af0c0c2a1bfd8e to your computer and use it in GitHub Desktop.
Save hayeah/0ece4a779a11689f09af0c0c2a1bfd8e to your computer and use it in GitHub Desktop.
> encode_abi(
["uint256", "uint256[]", "uint256"],
[0xaaaa, [0xb1, 0xb2, 0xb3], 0xbbbb]
).hex()
/************* HEAD (32*3 bytes) *************/
// arg1: 0xaaaa
000000000000000000000000000000000000000000000000000000000000aaaa
// arg2: look at position 0x60 for array data
0000000000000000000000000000000000000000000000000000000000000060
// arg3: 0xbbbb
000000000000000000000000000000000000000000000000000000000000bbbb
/************* TAIL (128 bytes) *************/
// position 0x60. Data for arg2.
0000000000000000000000000000000000000000000000000000000000000003
00000000000000000000000000000000000000000000000000000000000000b1
00000000000000000000000000000000000000000000000000000000000000b2
00000000000000000000000000000000000000000000000000000000000000b3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment