Skip to content

Instantly share code, notes, and snippets.

@obscuren
Last active September 15, 2015 21:36
Show Gist options
  • Save obscuren/20923b2d761115767906 to your computer and use it in GitHub Desktop.
Save obscuren/20923b2d761115767906 to your computer and use it in GitHub Desktop.
correction

Quirk #1 - hiding in plain sight

There are two types of accounts within Ethereum; normal accounts and contract accounts. Contracts are created by sending transactions with empty to-fields, and contain some data which is executed (a’la constructor) and, hopefully, returns some code which gets placed on the blockchain. The contracts are, naturally, part of the same address space as the normal accounts; and the address of a contract is determined thus :

address = sha3(rlp_encode(creator_account, creator_account_nonce))[12:]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment