Skip to main content

Ethereum has two types of accounts: externally owned user accounts, controlled by private keys, and contract accounts, controlled by their contract code.

In Ethereum, the state is made up of objects called "accounts", with each account having a 20-byte address and state transitions being direct transfers of value and information between accounts. An Ethereum account contains four fields:

  • The nonce, a counter used to make sure each transaction can only be processed once
  • The account's current ether balance
  • The account's contract code, if present
  • The account's storage (empty by default)

In general, there are two types of accounts: externally owned accounts, controlled by private keys, and contract accounts, controlled by their contract code. An externally owned account has no code, and one can send messages from an externally owned account by creating and signing a transaction; in a contract account, every time the contract account receives a message its code activates, allowing it to read and write to internal storage and send other messages or create contracts in turn.