Lesson 1 of 4 Deploying Smart Contracts

Ethereum Networks and Wallets

A contract moves through several networks before reaching production. This lesson compares mainnet, public testnets and local networks, explains chain IDs and RPC endpoints, and covers configuring wallets and getting test ether.

Learning outcomes

After completing this lesson, you will be able to:

  • Compare mainnet, Sepolia, Hoodi and local networks.
  • Explain chain IDs and replay protection.
  • Compare ways of reaching a network through RPC endpoints.
  • Describe how wallets and faucets support testnet deployment.

Networks and their purposes

Ethereum software can run many separate networks, each with its own chain, state and chain ID. The following table lists those a developer uses today.

NetworkChain IDPurposeEther
Mainnet1ProductionReal value
Sepolia11155111Recommended testnet for contracts and applicationsFree from faucets
Hoodi560048Testnet for validators, staking and protocol upgradesFree from faucets
Hardhat Network31337Local development and testingPre-funded accounts
Geth developer mode1337Local single-node chainOne pre-funded account

Testnets have been replaced over the years: Ropsten, Rinkeby and Kovan closed in 2022 and 2023, Goerli in 2024 and Holesky in September 2025. Questions that name an old testnet are asking about a public test network, which today means Sepolia for contract work.

Match the pairs

Chain IDs

Exam skills 4.1.1

Match each network with its chain ID.

Log in to try this activity Interactive activities are free with an account.

Chain IDs and replay protection

Since EIP-155, every signed transaction includes the chain ID. A transaction signed for Sepolia is invalid on mainnet, so it cannot be replayed there. Wallets and libraries read the chain ID from the connected node, and applications should check it before sending transactions, for example by comparing await web3.eth.getChainId() with the expected value.

Scenario questions

Replay protection

Exam skills 4.1.1 · 4.1.2

Apply chain IDs to protect transactions and applications.

Log in to try this activity Interactive activities are free with an account.

RPC endpoints

Tools reach a network through an RPC endpoint. The following comparison sets out the options.

Own node
ExamplesGeth with Lighthouse
SetupHours to days of sync, ongoing operation
LimitsYour hardware
Privacy and independenceHighest
Node provider
ExamplesInfura, Alchemy, QuickNode
SetupCreate an account and API key
LimitsPlan-based rate limits
Privacy and independenceProvider sees requests
Public endpoint
ExamplesFree community endpoints
SetupNone
LimitsStrict limits, no guarantees
Privacy and independenceOperator sees requests

Provider URLs usually contain an API key, so they are secrets and belong in a keystore or environment variable, not in source code.

Wallets and test ether

Deployments are signed by an externally owned account. In the browser, MetaMask holds the key and connects Remix or a DApp to the selected network; Sepolia is available in its list of test networks once test networks are shown. For scripts, the key is supplied to Hardhat through a configuration variable.

Testnet ether comes from faucets, web services that send small amounts to an address. Faucets limit how often each address can claim and some require a small mainnet balance or an account with the provider to deter abuse.

Exam tip

Create a separate account for development and testnet deployments. Never put a key that controls real funds into a development tool or configuration file.

True or false

Wallets and faucets

Exam skills 4.1.2

Check how deployments are signed and funded on a testnet.

Log in to try this activity Interactive activities are free with an account.
Worked example

The wrong network

A developer deploys a contract from Remix using Injected Provider - MetaMask. The transaction succeeds, but the contract cannot be found on Sepolia Etherscan. What is the most likely cause?

MetaMask was connected to a different network, possibly mainnet (spending real ether) or a local network. Remix deploys to whichever network the wallet has selected. Before deploying, check the network shown in MetaMask and the chain ID Remix displays under the environment selector.

Worked example

Choosing a network for each stage

A team is building a DApp. Which network should they use for (a) running unit tests on every commit, (b) letting external testers try the DApp with their own wallets, and (c) the public launch?

(a) Hardhat's in-process network: fast, free and resettable. (b) Sepolia: public, reachable by any wallet, with free test ether. (c) Mainnet. Hoodi would be wrong for (b): it is intended for validators and protocol testing, not for application testing.

Check yourself

Which public testnet should a contract developer use today, and what is its chain ID?

Show answer

Sepolia, chain ID 11155111. Hoodi is for validators and protocol testing; Goerli and Holesky are retired.

Exam Tips

Remember for the exam

  • Mainnet is chain ID 1; Sepolia (11155111) is the testnet for contracts; Hoodi (560048) is for validators.
  • Ropsten, Rinkeby, Kovan, Goerli and Holesky are retired.
  • The chain ID in each signed transaction prevents cross-network replay.
  • RPC URLs with API keys are secrets; testnet ether comes from faucets.