Accounts in the Ethereum Network

ยท

Externally Owned Accounts (EOA)

๐Ÿ‘‰ Master Ethereum wallets with our beginner's guide.

EOAs are user-controlled accounts, typically created by importing a seed phrase. Key features include:

Contract Accounts (Smart Contracts)

These accounts are governed by code executed on the Ethereum Virtual Machine (EVM). Unlike EOAs:

Key Components of Contract Accounts:

  1. codeHash: Unique hash representing the EVM code (always empty for EOAs)
  2. storageRoot: Merkle hash of the contract's storage data

Comparison Table

| Feature | External Account | Contract Account |
|------------------|------------------|------------------|
| Balance | โœ… | โœ… |
| Nonce | โœ… | โœ… |
| codeHash | โŒ | โœ… |
| storageRoot | โŒ | โœ… |
| Transaction Initiation | โœ… | โŒ (Triggered by calls) |
| Private Key | โœ… | โŒ |
| Creation Cost | Free | Gas Required |

FAQs

โ“ Can contract accounts hold ETH?
Yes, both account types can store ETH balances.

โ“ What happens to a contract's storage data when it's deleted?
The storageRoot is cleared, but historical data remains on-chain.

โ“ Why can't contracts initiate transactions?
They only execute when called by EOAs or other contracts.

โ“ How are contract addresses determined?
Calculated from the creator's address and nonce.

๐Ÿ‘‰ Explore Ethereum development tools to build your first smart contract.

Key Takeaways