Skip to content

Instantly share code, notes, and snippets.

@hayeah

hayeah/block13. Secret

Created October 24, 2017 12:16
Show Gist options
  • Save hayeah/a92209730c29dd2b4fc8fbf97da00382 to your computer and use it in GitHub Desktop.
Save hayeah/a92209730c29dd2b4fc8fbf97da00382 to your computer and use it in GitHub Desktop.
// Reserve 0x60 bytes of memory for Solidity internal uses.
mstore(0x40, 0x60)
// Non-payable contract. Revert if caller sent ether.
jumpi(tag_1, iszero(callvalue))
0x0
dup1
revert
// Copy contract code into memory, and return.
tag_1:
tag_2:
dataSize(sub_0)
dup1
dataOffset(sub_0)
0x0
codecopy
0x0
return
stop
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment