
Two kinds of account
Everything on Ethereum belongs to an account, and there are two kinds. An externally owned account is “controlled by anyone with the private keys,” in ethereum.org’s words. That’s your wallet.
A contract account is “a smart contract deployed to the network, controlled by code.” Nobody holds a key to it; the code decides what it does, and lesson 3 is about that.
Both kinds hold four things: a balance in ether; a nonce, which for a wallet is a count of the transactions it has sent; a code hash, empty for an ordinary wallet; and a storage root, the fingerprint of any data the account keeps.
Your address is made from your public key, by taking “the last 20 bytes of the Keccak-256 hash of the public key” and putting 0x in front.
Creating a wallet account costs nothing. Deploying a contract costs gas, because it takes up space on every computer that runs the network.
Continue with The Crossover Pro
The rest of this story, plus two paid editions a week. $24.99 a month, or $249 a year. Already a member? Sign in above.
Subscribe to Pro