Skip to content

Instantly share code, notes, and snippets.

@hayeah

hayeah/block11. Secret

Created September 3, 2017 10:29
Show Gist options
  • Save hayeah/59ac1d75794aae34d21a164f61c87727 to your computer and use it in GitHub Desktop.
Save hayeah/59ac1d75794aae34d21a164f61c87727 to your computer and use it in GitHub Desktop.
// Load the first 4 bytes as method selector
and(div(calldataload(0x0), 0x100000000000000000000000000000000000000000000000000000000), 0xffffffff)
// if selector matches `0xee919d50`, goto setA
0xee919d50
dup2
eq
tag_2
jumpi
// No method. Fail & revert.
tag_1:
0x0
dup1
revert
// Body of setA
tag_2:
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment