Skip to content

Instantly share code, notes, and snippets.

@maurelian
Created February 22, 2018 22:47
Show Gist options
  • Save maurelian/f5f4eb03d283c1abf0a0fa10e0a35329 to your computer and use it in GitHub Desktop.
Save maurelian/f5f4eb03d283c1abf0a0fa10e0a35329 to your computer and use it in GitHub Desktop.
layout title date
post
contract creation golf
2018-02-22 17:33

Fun little learning exercise, what's the shortest bytecode you can send that will publish a contract with non-zero bytecode? The response to getCode() should have some characters that aren’t either 0 or x.

To test it out:

  1. web3.eth.sendTransaction({data:'BYTECODE', from:web3.eth.accounts[0]});
  2. web3.eth.getCode('THE_ADDRESS');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment