Scroll is a bytecode-equivalent zkEVM Layer 2 — Solidity contracts compile to the exact same bytecode as on Ethereum and execute identically, with each batch proven by a SNARK and verified on L1. Mainnet chain ID 534352, gas token ETH, with sequencer and prover operated by Scroll today and a clear roadmap toward decentralization.
- 01drop-in EVM dapps (no opcode caveats)
- 02ZK L2 with ETH gas and Ethereum settlement
- 03DeFi forks of mainnet protocols
- 04research / educational deployments (Scroll is open-source end-to-end)
- pnpm add viem wagmi
| Variable | Scope | Description |
|---|---|---|
| NEXT_PUBLIC_SCROLL_RPC_URL | Client | Scroll RPC URL (mainnet: https://rpc.scroll.io). |
| NEXT_PUBLIC_SCROLL_CHAIN_ID | Client | Chain ID — 534352 for mainnet, 534351 for Scroll Sepolia testnet. |
Use viem's built-in `scroll` / `scrollSepolia` chains (`import { scroll } from 'viem/chains'`) — chain ID 534352, gas token ETH, RPC `https://rpc.scroll.io`. Because Scroll is bytecode-equivalent, Foundry/Hardhat workflows are unchanged: `forge create --rpc-url $SCROLL_RPC ...` produces the same artifacts as on mainnet. Bridge ETH/ERC-20s via the canonical Scroll Messenger (`scroll.io/bridge`) — the L1 `L1ScrollMessenger` lives at `0x6774Bcbd5ceCeF1336b5300fb5186A12DDD8b367`. For nodes use `scroll-tech/scroll` or run a Geth-compatible client with Scroll's L2 fork; indexers like The Graph and Goldsky support chain 534352.
- ⚑Bytecode-equivalent does not mean fee-equivalent. Scroll charges L2 execution gas plus an L1 data fee (calldata + proof verification share) — `eth_estimateGas` returns L2 only, so wallets must add the Scroll-specific L1 fee or transactions get under-priced.
- ⚑Withdrawals to L1 require waiting for the batch to be proven and finalized on L1 — typically several hours. Build UX around this; route fast exits through Across/Stargate at the cost of bridge fees.
- ⚑Sequencer is centralized and operated by Scroll Foundation; force-inclusion via the L1 enqueue contract exists but is rarely exercised. Plan for liveness incidents on a single operator.
- ⚑Some precompiles and edge-case opcodes (`SELFDESTRUCT`, `BLOBHASH`, certain `MODEXP` inputs) behave differently or are unsupported pending circuit upgrades. The bytecode-equivalent claim covers the common path — verify gas-sensitive contracts on Sepolia first.
- ⚑Scroll has run permissionless prover initiatives and circuit upgrades; the prover is on a relatively fast cadence. Watch upgrade announcements and re-run gas/regression tests around hard forks.
- ⚑Bridged USDC on Scroll is not native CCTP at the canonical bridge — Circle ships native CCTP separately. Token-route code that assumes one canonical USDC will mismatch between the bridged and CCTP versions.