Skip to content
Home » Ethereum Accounts

Ethereum Accounts

Ceegees-Ethereum-And-Ethereum-Accounts

An Ethereum account is an account with some cryptocurrency (ETH) that can send transactions on the Ethereum network. There is two type of Ethereum account, one which user can control and one which code controls.

1. Externally-owned Account

Externally-owned accounts (EOA) are controlled by a user with private keys. It’s free of cost to create an externally-owned account. Once an account is create, it can send, receive, and hold ETH and other ERC-20 tokens. They can also interact with smart contracts already deployed and reside in the Ethereum network.

To create an account, generate a random private key with any cryptography library. Then the public keys is create using Elliptic Curve Digital Signature Algorithm with the help of the private key. Finally, the account address is create by prepending 0x to the last 20 bytes of the Keccak-256 hash of the public key.

An account will have three specific pieces of information when created. They are,

  • Private Key: A 64-character long hexadecimal string is used to access and control the account. Think of the private key as a password that can give you access to the funds.
  • Public Key: It’s a hexadecimal string derived from the private key and used to generate the account address.
  • Account Address: It is a 20-byte hexadecimal value that uniquely identifies an account on the Ethereum blockchain. Think of an account address as a bank account number used in traditional banking systems, as they are used to receive and send money.

2. Smart Contract

Smart contracts are a type of account that can store, send, and receive money as cryptocurrency. A smart contract is also a program that resides at a specific address inside a blockchain, and the functions inside the smart contract determine how it should behave.

We can automate many solutions by writing a contract on a blockchain and are controlled by code to simplify and make things efficient.

Components of an Ethereum Account

An Ethereum account contains the following components,

  • Nonce:  A counter that indicates the number of transactions sent from an externally-owned account.
  • Balance: Amount of Wei this account owns.
  • codeHash: It’s the hash value of the code in the Ethereum virtual machine (EVM). This field is an empty string for externally-owned accounts as they are not controlled by code, unlike smart contracts.
  • storageHash: The hash value of the storage contents of the Ethereum account. By default, this field is empty.

Creating an externally-owned account with MetaMask

MetaMask is a web browser extension and mobile application that provides a user-friendly interface for interacting with the Ethereum blockchain. It is a digital wallet for storing, managing, and sending Ethereum and other ERC-20 tokens.

MetaMask logo

Let’s follow the steps to create an externally owned Ethereum account on Metamask.

Firstly: Install the MetaMask Chrome extension from the Chrome web store.

Secondly: Open the Metamask extension and click the “Create a new wallet” button.

Thirdly: Set up a password for your Metamask wallet.

Congrats 🎉, you have successfully set up your MetaMask wallet.

Receive Free ETH on Sepolia Testnet

Let’s follow the steps to receive free ETH cryptocurrency on the Sepolia testnet using the Infura faucet.

As first step: Unhide the test networks by navigating to Settings >> Advanced and then toggling the “Show test networks” switch to ON state.

Then secondly: Switch your current network from Ethereum Mainnet to the Sepolia test network.

Thirdly then: Copy your account address displayed under “Account 1”, and visit https://www.infura.io/faucet and create an account.

Fourth and final step: Once you’ve verified your account, visit https://www.infura.io/faucet again and paste your account address and click on “Receive ETH”.

Congrats 🎉, enjoy the free ETH on the Sepolia test network.