Skip to main content

Ethereum Accounts

In Ethereum, the state is made up of objects called 'accounts'. An account having:
  • 20 byte address
  • state transitions being direct transfers of value and information between accounts
An ethereum account contains four fields:
  • nonce - counter used to make sure each transaction can be processed once
  • ether balance - account's current balance
  • contract code(optional) - account's contact code
  • storage(default - empty) - account's storage
Ether, is the main crypto-fuel of Ethereum and is used to pay transaction fees.

Generally, there are two types of accounts:
  • Externally Owned Accounts(EOA)
    • controlled by private keys
    • has no code
    • by creating and signing a transaction, one can send messages
    • has following information available to them:
      • Total number of Ethers for the account
      • Functionalities to send and receive transaction
      • Private and Public Keys to manage the account.
  • Contract Accounts(CA)
    • controlled by their contract code
    • every time the 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
    • has following information available to them:
      • Total number of Ethers provisioned for the contract.
      • Smart Contract Code which is used to run functions and fetch information by the users.
      • Code execution functionalities which are triggered by transactions made by users or other contracts.
      • Maintain its own permanent storage, which can be used to trigger other functionalities. This storage states that as long the computation power is provided, we can solve all mathematical puzzles.

Comments