ERC-7876 · Draft · ERC · 2025-01-03
ERC-7876: Ethereum Network Configuration for DApps
A standard JSON format describing the networks a dapp supports (RPC URLs, native currency, contract addresses with ABI links, block explorers and testnet/L2 relations), so the same network configuration can be shared across apps, platforms and teams.
What problem does it solve?
Dapps that support many EVM networks each keep their own network list: RPC endpoints, chain IDs, explorer link formats, deployed contract addresses. These lists are written in different shapes, duplicated across web, iOS and Android code, and drift out of sync when a contract is redeployed.
ERC-7876 proposes one JSON format for all of this. Network operators can publish configs so dapps support them easily, contract teams can ship addresses and ABIs in a consistent way, and organisations can share one file across platforms.
How it works
The top-level object has version, timestamp (ISO 8601), summary, description, an optional abiRoot, and networks, keyed by chain ID as a string (e.g. "1"). Each network contains:
name,testnet, andnativeCurrency(name,symbol,decimals).rpcs: named entries with aurl.relations:mainnetChainId(for a testnet;nullon mainnet) andparentChainId(e.g. the L1 of an L2).explorers: named entries with arootURL plus relative path templates using:block,:address,:tx,:token; unavailable paths arenull.contracts: named entries with an EIP-55 checksummedaddress,blockCreated, and an optionalabiUrl(relative toabiRootor absolute). A contract not deployed on that network is explicitlynull. ABIs must not be inlined.
Extensions: implementations must ignore unknown properties (or use them where feasible). Extensions may add fields but must not change the type of existing ones; for example, blockCreated must stay a number, not a hex string. Union types are discouraged.
The format follows EIP-3085 (wallet_addEthereumChain) where it can, but departs from it where that structure would block extensions.
Sample code
A minimal configuration for one network (placeholder URLs and address):
{
"version": "1.0.0",
"timestamp": "2026-01-01T00:00:00Z",
"summary": "Example dapp networks",
"description": "Networks and contracts used by the example dapp",
"abiRoot": "https://dapp.example.com/abi",
"networks": {
"11155111": {
"name": "Sepolia",
"testnet": true,
"nativeCurrency": { "name": "Sepolia Ether", "symbol": "ETH", "decimals": 18 },
"relations": { "mainnetChainId": 1, "parentChainId": null },
"rpcs": { "main": { "url": "https://sepolia-rpc.example.com" } },
"explorers": {
"scan": { "root": "https://sepolia.explorer.example", "block": "/block/:block",
"address": "/address/:address", "tx": "/tx/:tx", "nft": null }
},
"contracts": {
"Registry": { "address": "0x0000000000000000000000000000000000000001",
"blockCreated": 1, "abiUrl": "./Registry.json" },
"Staking": null
}
}
}
}
Building an explorer link (TypeScript):
const e = config.networks["11155111"].explorers.scan;
const url = e.root + e.tx!.replace(":tx", txHash);
Things to know
- Status is Draft.
- Only public data belongs in the file. Never include private keys or mnemonics. The spec allows an API-key extension for RPCs, but such keys must not be put in publicly distributed configs.
- Contract names must mean the same contract across all networks in one file; ideally they match the Solidity contract name.
- No standard contract names are defined; each dapp chooses its own.
- EIP-3085, which it aligns with, is itself Stagnant.