Accounts
Understand the difference between an externally-owned account (EOA) and a contract account (CA).
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 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.
Get hands-on with 1200+ tech skills courses.