Search⌘ K
AI Features

Accounts

Learn about Ethereum accounts by exploring their two main types: externally-owned accounts (EOA) and contract accounts (CA). Understand how EOAs are controlled by private keys and manage transactions with nonces, while contract accounts host immutable smart contracts. This lesson helps you grasp address formation, account attributes, and the security role of nonces in maintaining transaction order and preventing replay attacks.

An account on Ethereum is defined by two features:

  • It has an Ether balance.

  • It can interact with deployed smart contracts.

There are two types of Ethereum accounts—Externally-owned accounts (EOA) and Contract accounts (CA).

Account data model

An Ethereum account is identified by an address. An address is a hexadecimalWhile the decimal system represents numbers using 10 symbols, the hexadecimal uses 16 distinct symbols. The symbols "0 1 2 3 4 5 6 7 8 9" represent values from 0 to 9, and "A B C D E F" represent values from 10 to 15. string made up of 40 characters with a leading “0x” (i.e. 0x08001f350afCbF4eccA29ef5f805739b2E3EC8aC).

Both account types have in common the ability to hold/receive/send Ethers and send transactions to the network. Their data model is the same and is composed of four attributes:

  • nonce: A counter number (not to be confused with the block nonce).

  • balance: The number of Wei owned by the account.

  • codeHash: A reference to EVM code tied to the account (only for CA).

  • storageRoot: A reference to the storage content tied to the account (only for CA).

These four attributes exist in both accounts, but the last two are only relevant in the case of CA.

Ethereum account data model
Ethereum account data model

The account address refers to the account state that is stored inside the Ethereum world state. The address constitutes the key through which to retrieve the account state. 

...