← Protocols
Ethereum
01Description

Ethereum mainnet — the canonical EVM L1 (chain ID 1) and de-facto settlement layer for L2s. Post-Pectra (May 2025) supports EIP-7702 (EOA → smart-account upgrade), EIP-7691 (blob expansion for L2 data), and EIP-7251 (raised validator effective balance to 2048 ETH). Default choice for high-value DeFi, RWA settlement, governance, and any product that needs maximum security/decentralization at the cost of L2-level UX latency and fees.

02Best for
  • 01high-value DeFi positions and RWA settlement
  • 02blue-chip NFT collections and onchain governance
  • 03smart-contract deployments that need the deepest liquidity
  • 04EIP-7702 sponsored / batched transactions on EOAs
  • 05L2 settlement anchor (blobs + state roots)
03Install
  • pnpm add viem wagmi
  • pnpm add @wagmi/connectors
04Environment variables
VariableScopeDescription
NEXT_PUBLIC_ETH_RPC_URLClientMainnet RPC URL. Prefer a managed provider (Alchemy, QuickNode, Infura, dRPC) over public endpoints — public RPCs throttle hard.
NEXT_PUBLIC_ETH_CHAIN_IDClientChain ID — 1 for mainnet, 11155111 for Sepolia, 17000 for Holesky.
ETHERSCAN_API_KEYServerOptional. Etherscan v2 unified API key for tx lookups, contract verification, and ABI fetches across all EVM chains.
05Prompt snippet
Use viem's built-in `mainnet` / `sepolia` chain definitions and wagmi for the React hooks layer. `createPublicClient({ chain: mainnet, transport: http(NEXT_PUBLIC_ETH_RPC_URL) })` for reads, `createWalletClient` (or wagmi's `useWriteContract`) for writes. For EIP-7702 flows (EOA temporarily acting as a smart account), use viem's `signAuthorization` + `sendTransaction({ authorizationList })`. For gas estimation, prefer `estimateGas` + EIP-1559 (`maxFeePerGas`, `maxPriorityFeePerGas`) over legacy gasPrice. Never hardcode addresses — chain configs differ between mainnet and testnets. Verify contracts via Etherscan v2 (`/api?chainid=1&module=contract&action=getabi&address=...`).
06Gotchas
  • Gas on mainnet is meaningfully higher than on L2s — for consumer flows requiring <$0.10 per action, settle on an L2 (Base/Arbitrum/Optimism) and only touch mainnet for high-value moves.
  • Post-Pectra, EOAs can be temporarily upgraded to smart accounts via EIP-7702 — your tx-signing UX must distinguish 'signing an auth' from 'signing a transaction' to avoid scaring users.
  • Public RPCs (1rpc.io, llamarpc, etc.) rate-limit aggressively and silently drop subscriptions. For production always use a managed provider with eth_subscribe support.
  • Reorg risk is small but nonzero — wait 12+ blocks (~2.5 min) for finality-sensitive UX, or use the Beacon Chain `finalized` block tag.
  • Sepolia is the recommended testnet (Goerli is deprecated). Holesky is for staking/validator work.
  • Blob fees (EIP-4844) are a separate market from gas — L2s that batch heavily can see blob fee spikes that don't show up in normal gas trackers.
07Alternatives