{"eip":7876,"title":"Ethereum Network Configuration for DApps","description":"EVM-compatible network configuration specification for DApps supporting any custom network features through extensions.","authors":["Bogdan Gusiev (@bogdan)","Sergey Bomko (@aquiladev)"],"status":"Draft","type":"Standards Track","category":"ERC","created":"2025-01-03","requires":[55],"discussionsTo":"https://ethereum-magicians.org/t/eip-7876-unified-network-configuration/22763","repo":"ERCs","label":"ERC-7876","officialUrl":"https://eips.ethereum.org/EIPS/eip-7876","sourceUrl":"https://github.com/ethereum/ERCs/blob/master/ERCS/erc-7876.md","url":"https://eips.huatuo.xyz/eip-7876/","tldr":{"en":"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.","ja":"dapp が対応するネットワーク（RPC URL、ネイティブ通貨、ABI リンク付きのコントラクトアドレス、ブロックエクスプローラー、テストネットや L2 の関係）を記述する標準 JSON 形式。同じネットワーク設定をアプリ、プラットフォーム、チーム間で共有できる。","ko":"dapp이 지원하는 네트워크(RPC URL, 네이티브 통화, ABI 링크가 있는 컨트랙트 주소, 블록 탐색기, 테스트넷/L2 관계)를 기술하는 표준 JSON 형식. 같은 네트워크 설정을 앱, 플랫폼, 팀 사이에서 공유할 수 있다.","zh":"一种标准 JSON 格式，用于描述 dapp 所支持的网络（RPC URL、原生货币、附带 ABI 链接的合约地址、区块浏览器以及测试网/L2 关系），使同一份网络配置可以在应用、平台和团队之间共享。"},"tags":["config","json","dapps","networks","tooling"],"explainers":{"en":{"lang":"en","tldr":"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.","tags":["config","json","dapps","networks","tooling"],"related":[55,3085,155,1967],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/eip-7876/","markdown":"## What problem does it solve?\n\nDapps 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.\n\nERC-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.\n\n## How it works\n\nThe 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:\n\n- `name`, `testnet`, and `nativeCurrency` (`name`, `symbol`, `decimals`).\n- `rpcs`: named entries with a `url`.\n- `relations`: `mainnetChainId` (for a testnet; `null` on mainnet) and `parentChainId` (e.g. the L1 of an L2).\n- `explorers`: named entries with a `root` URL plus relative path templates using `:block`, `:address`, `:tx`, `:token`; unavailable paths are `null`.\n- `contracts`: named entries with an [EIP-55](/eip-55/) checksummed `address`, `blockCreated`, and an optional `abiUrl` (relative to `abiRoot` or absolute). A contract not deployed on that network is explicitly `null`. ABIs must **not** be inlined.\n\n**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.\n\nThe format follows [EIP-3085](/eip-3085/) (`wallet_addEthereumChain`) where it can, but departs from it where that structure would block extensions.\n\n## Sample code\n\nA minimal configuration for one network (placeholder URLs and address):\n\n```json\n{\n  \"version\": \"1.0.0\",\n  \"timestamp\": \"2026-01-01T00:00:00Z\",\n  \"summary\": \"Example dapp networks\",\n  \"description\": \"Networks and contracts used by the example dapp\",\n  \"abiRoot\": \"https://dapp.example.com/abi\",\n  \"networks\": {\n    \"11155111\": {\n      \"name\": \"Sepolia\",\n      \"testnet\": true,\n      \"nativeCurrency\": { \"name\": \"Sepolia Ether\", \"symbol\": \"ETH\", \"decimals\": 18 },\n      \"relations\": { \"mainnetChainId\": 1, \"parentChainId\": null },\n      \"rpcs\": { \"main\": { \"url\": \"https://sepolia-rpc.example.com\" } },\n      \"explorers\": {\n        \"scan\": { \"root\": \"https://sepolia.explorer.example\", \"block\": \"/block/:block\",\n                  \"address\": \"/address/:address\", \"tx\": \"/tx/:tx\", \"nft\": null }\n      },\n      \"contracts\": {\n        \"Registry\": { \"address\": \"0x0000000000000000000000000000000000000001\",\n                      \"blockCreated\": 1, \"abiUrl\": \"./Registry.json\" },\n        \"Staking\": null\n      }\n    }\n  }\n}\n```\n\nBuilding an explorer link (TypeScript):\n\n```ts\nconst e = config.networks[\"11155111\"].explorers.scan;\nconst url = e.root + e.tx!.replace(\":tx\", txHash);\n```\n\n## Things to know\n\n- Status is **Draft**.\n- 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.\n- Contract names must mean the same contract across all networks in one file; ideally they match the Solidity contract name.\n- No standard contract names are defined; each dapp chooses its own.\n- [EIP-3085](/eip-3085/), which it aligns with, is itself Stagnant.\n"},"ja":{"lang":"ja","tldr":"dapp が対応するネットワーク（RPC URL、ネイティブ通貨、ABI リンク付きのコントラクトアドレス、ブロックエクスプローラー、テストネットや L2 の関係）を記述する標準 JSON 形式。同じネットワーク設定をアプリ、プラットフォーム、チーム間で共有できる。","tags":["config","json","dapps","networks","tooling"],"related":[55,3085,155,1967],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ja/eip-7876/","markdown":"## 何を解決するのか\n\n多くの EVM ネットワークに対応する dapp は、それぞれ独自のネットワークリスト（RPC エンドポイント、チェーン ID、エクスプローラーのリンク形式、デプロイ済みのコントラクトアドレス）を保持しています。これらのリストは形がバラバラで、Web、iOS、Android のコードに重複して書かれ、コントラクトを再デプロイするたびにずれていきます。\n\nERC-7876 は、これらすべてのための JSON 形式を 1 つ提案します。ネットワークの運営者は設定を公開して dapp が簡単に対応できるようにし、コントラクトのチームはアドレスと ABI を一貫した方法で配布でき、組織は 1 つのファイルをプラットフォーム間で共有できます。\n\n## 仕組み\n\nトップレベルのオブジェクトは、`version`、`timestamp`（ISO 8601）、`summary`、`description`、任意の `abiRoot`、そして文字列の**チェーン ID**（例: `\"1\"`）をキーとする `networks` を持ちます。各ネットワークには次が含まれます。\n\n- `name`、`testnet`、`nativeCurrency`（`name`、`symbol`、`decimals`）。\n- `rpcs`: `url` を持つ名前付きエントリ。\n- `relations`: `mainnetChainId`（テストネット用。メインネットでは `null`）と `parentChainId`（たとえば L2 の L1）。\n- `explorers`: `root` の URL と、`:block`、`:address`、`:tx`、`:token` を使う相対パスのテンプレートを持つ名前付きエントリ。利用できないパスは `null`。\n- `contracts`: [EIP-55](/eip-55/) のチェックサム付き `address`、`blockCreated`、任意の `abiUrl`（`abiRoot` からの相対、または絶対）を持つ名前付きエントリ。そのネットワークにデプロイされていないコントラクトは明示的に `null`。ABI をインライン化しては**なりません**。\n\n**拡張:** 実装は未知のプロパティを無視しなければなりません（または可能なら利用します）。拡張はフィールドを追加できますが、既存のフィールドの型を変えてはなりません。たとえば `blockCreated` は 16 進文字列ではなく数値のままにします。ユニオン型は推奨されません。\n\nこの形式は、可能な範囲で [EIP-3085](/eip-3085/)（`wallet_addEthereumChain`）に従いますが、その構造が拡張の妨げになる箇所では離れています。\n\n## サンプルコード\n\n1 つのネットワークの最小構成（URL とアドレスはプレースホルダー）:\n\n```json\n{\n  \"version\": \"1.0.0\",\n  \"timestamp\": \"2026-01-01T00:00:00Z\",\n  \"summary\": \"Example dapp networks\",\n  \"description\": \"Networks and contracts used by the example dapp\",\n  \"abiRoot\": \"https://dapp.example.com/abi\",\n  \"networks\": {\n    \"11155111\": {\n      \"name\": \"Sepolia\",\n      \"testnet\": true,\n      \"nativeCurrency\": { \"name\": \"Sepolia Ether\", \"symbol\": \"ETH\", \"decimals\": 18 },\n      \"relations\": { \"mainnetChainId\": 1, \"parentChainId\": null },\n      \"rpcs\": { \"main\": { \"url\": \"https://sepolia-rpc.example.com\" } },\n      \"explorers\": {\n        \"scan\": { \"root\": \"https://sepolia.explorer.example\", \"block\": \"/block/:block\",\n                  \"address\": \"/address/:address\", \"tx\": \"/tx/:tx\", \"nft\": null }\n      },\n      \"contracts\": {\n        \"Registry\": { \"address\": \"0x0000000000000000000000000000000000000001\",\n                      \"blockCreated\": 1, \"abiUrl\": \"./Registry.json\" },\n        \"Staking\": null\n      }\n    }\n  }\n}\n```\n\nエクスプローラーのリンクを組み立てる（TypeScript）:\n\n```ts\nconst e = config.networks[\"11155111\"].explorers.scan;\nconst url = e.root + e.tx!.replace(\":tx\", txHash);\n```\n\n## 知っておくべきこと\n\n- ステータスは **Draft** です。\n- ファイルに入れてよいのは公開データだけです。秘密鍵やニーモニックは絶対に含めないでください。仕様は RPC 用の API キー拡張を認めていますが、そのようなキーを公開配布される設定に入れては**なりません**。\n- コントラクト名は、1 つのファイル内のすべてのネットワークで同じコントラクトを意味しなければなりません。理想的には Solidity のコントラクト名と一致させます。\n- 標準的なコントラクト名は定義されておらず、各 dapp が独自に選びます。\n- この形式が合わせている [EIP-3085](/eip-3085/) 自体が Stagnant です。\n"},"ko":{"lang":"ko","tldr":"dapp이 지원하는 네트워크(RPC URL, 네이티브 통화, ABI 링크가 있는 컨트랙트 주소, 블록 탐색기, 테스트넷/L2 관계)를 기술하는 표준 JSON 형식. 같은 네트워크 설정을 앱, 플랫폼, 팀 사이에서 공유할 수 있다.","tags":["config","json","dapps","networks","tooling"],"related":[55,3085,155,1967],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/ko/eip-7876/","markdown":"## 어떤 문제를 해결하나요?\n\n많은 EVM 네트워크를 지원하는 dapp은 각자 자기만의 네트워크 목록(RPC 엔드포인트, 체인 ID, 탐색기 링크 형식, 배포된 컨트랙트 주소)을 유지합니다. 이 목록들은 모양이 제각각이고, 웹, iOS, Android 코드에 중복되어 있으며, 컨트랙트를 다시 배포하면 서로 어긋나게 됩니다.\n\nERC-7876은 이 모든 것을 위한 JSON 형식을 하나 제안합니다. 네트워크 운영자는 설정을 공개해 dapp이 쉽게 지원하게 할 수 있고, 컨트랙트 팀은 주소와 ABI를 일관된 방식으로 배포할 수 있으며, 조직은 하나의 파일을 플랫폼 간에 공유할 수 있습니다.\n\n## 어떻게 동작하나요?\n\n최상위 객체는 `version`, `timestamp`(ISO 8601), `summary`, `description`, 선택적 `abiRoot`, 그리고 문자열 **체인 ID**(예: `\"1\"`)를 키로 하는 `networks`를 가집니다. 각 네트워크에는 다음이 들어 있습니다.\n\n- `name`, `testnet`, `nativeCurrency`(`name`, `symbol`, `decimals`).\n- `rpcs`: `url`을 가진 이름 있는 항목.\n- `relations`: `mainnetChainId`(테스트넷용, 메인넷에서는 `null`)와 `parentChainId`(예: L2의 L1).\n- `explorers`: `root` URL과 `:block`, `:address`, `:tx`, `:token`을 쓰는 상대 경로 템플릿을 가진 이름 있는 항목. 사용할 수 없는 경로는 `null`.\n- `contracts`: [EIP-55](/eip-55/) 체크섬이 적용된 `address`, `blockCreated`, 선택적 `abiUrl`(`abiRoot` 기준 상대 경로 또는 절대 경로)을 가진 이름 있는 항목. 해당 네트워크에 배포되지 않은 컨트랙트는 명시적으로 `null`입니다. ABI를 인라인으로 넣어서는 **안 됩니다**.\n\n**확장:** 구현은 알 수 없는 속성을 무시해야 합니다(또는 가능하면 활용합니다). 확장은 필드를 추가할 수 있지만 기존 필드의 타입을 바꿔서는 안 됩니다. 예를 들어 `blockCreated`는 16진수 문자열이 아니라 숫자로 유지해야 합니다. 유니온 타입은 권장되지 않습니다.\n\n이 형식은 가능한 한 [EIP-3085](/eip-3085/)(`wallet_addEthereumChain`)를 따르되, 그 구조가 확장을 막는 부분에서는 벗어납니다.\n\n## 샘플 코드\n\n네트워크 하나에 대한 최소 설정(URL과 주소는 자리 표시자):\n\n```json\n{\n  \"version\": \"1.0.0\",\n  \"timestamp\": \"2026-01-01T00:00:00Z\",\n  \"summary\": \"Example dapp networks\",\n  \"description\": \"Networks and contracts used by the example dapp\",\n  \"abiRoot\": \"https://dapp.example.com/abi\",\n  \"networks\": {\n    \"11155111\": {\n      \"name\": \"Sepolia\",\n      \"testnet\": true,\n      \"nativeCurrency\": { \"name\": \"Sepolia Ether\", \"symbol\": \"ETH\", \"decimals\": 18 },\n      \"relations\": { \"mainnetChainId\": 1, \"parentChainId\": null },\n      \"rpcs\": { \"main\": { \"url\": \"https://sepolia-rpc.example.com\" } },\n      \"explorers\": {\n        \"scan\": { \"root\": \"https://sepolia.explorer.example\", \"block\": \"/block/:block\",\n                  \"address\": \"/address/:address\", \"tx\": \"/tx/:tx\", \"nft\": null }\n      },\n      \"contracts\": {\n        \"Registry\": { \"address\": \"0x0000000000000000000000000000000000000001\",\n                      \"blockCreated\": 1, \"abiUrl\": \"./Registry.json\" },\n        \"Staking\": null\n      }\n    }\n  }\n}\n```\n\n탐색기 링크 만들기(TypeScript):\n\n```ts\nconst e = config.networks[\"11155111\"].explorers.scan;\nconst url = e.root + e.tx!.replace(\":tx\", txHash);\n```\n\n## 알아둘 점\n\n- 상태는 **Draft**입니다.\n- 파일에는 공개 데이터만 들어가야 합니다. 개인 키나 니모닉은 절대 포함하지 마세요. 사양은 RPC용 API 키 확장을 허용하지만, 그런 키를 공개 배포되는 설정에 넣어서는 **안 됩니다**.\n- 컨트랙트 이름은 한 파일 안의 모든 네트워크에서 같은 컨트랙트를 의미해야 하며, 이상적으로는 Solidity 컨트랙트 이름과 일치합니다.\n- 표준 컨트랙트 이름은 정의되어 있지 않으며, 각 dapp이 자체적으로 정합니다.\n- 이 형식이 맞추고 있는 [EIP-3085](/eip-3085/) 자체가 Stagnant 상태입니다.\n"},"zh":{"lang":"zh","tldr":"一种标准 JSON 格式，用于描述 dapp 所支持的网络（RPC URL、原生货币、附带 ABI 链接的合约地址、区块浏览器以及测试网/L2 关系），使同一份网络配置可以在应用、平台和团队之间共享。","tags":["config","json","dapps","networks","tooling"],"related":[55,3085,155,1967],"updated":"2026-10-19","url":"https://eips.huatuo.xyz/zh/eip-7876/","markdown":"## 它解决什么问题？\n\n支持众多 EVM 网络的 dapp 各自维护自己的网络列表：RPC 端点、链 ID、浏览器链接格式、已部署的合约地址。这些列表的结构各不相同，在 Web、iOS 和 Android 代码中重复存在，并在合约重新部署时逐渐失去同步。\n\nERC-7876 为这一切提出了一种统一的 JSON 格式。网络运营方可以发布配置，使 dapp 轻松支持它们；合约团队可以用一致的方式提供地址和 ABI；组织可以在各平台间共用一个文件。\n\n## 它如何运作\n\n顶层对象包含 `version`、`timestamp`（ISO 8601）、`summary`、`description`、可选的 `abiRoot`，以及以字符串形式的**链 ID**（如 `\"1\"`）为键的 `networks`。每个网络包含：\n\n- `name`、`testnet` 和 `nativeCurrency`（`name`、`symbol`、`decimals`）。\n- `rpcs`：带有 `url` 的命名条目。\n- `relations`：`mainnetChainId`（用于测试网；主网上为 `null`）和 `parentChainId`（例如 L2 的 L1）。\n- `explorers`：带有 `root` URL 以及使用 `:block`、`:address`、`:tx`、`:token` 的相对路径模板的命名条目；不可用的路径为 `null`。\n- `contracts`：带有符合 [EIP-55](/eip-55/) 校验和的 `address`、`blockCreated` 和可选 `abiUrl`（相对于 `abiRoot` 或绝对路径）的命名条目。未部署在该网络上的合约明确为 `null`。ABI **不得**内联。\n\n**扩展：**实现必须忽略未知属性（或在可行时使用它们）。扩展可以添加字段，但不得更改现有字段的类型；例如 `blockCreated` 必须保持为数字，而不是十六进制字符串。不鼓励使用联合类型。\n\n该格式在可能的情况下遵循 [EIP-3085](/eip-3085/)（`wallet_addEthereumChain`），但在该结构会妨碍扩展的地方有所偏离。\n\n## 示例代码\n\n一个网络的最小配置（URL 和地址均为占位符）：\n\n```json\n{\n  \"version\": \"1.0.0\",\n  \"timestamp\": \"2026-01-01T00:00:00Z\",\n  \"summary\": \"Example dapp networks\",\n  \"description\": \"Networks and contracts used by the example dapp\",\n  \"abiRoot\": \"https://dapp.example.com/abi\",\n  \"networks\": {\n    \"11155111\": {\n      \"name\": \"Sepolia\",\n      \"testnet\": true,\n      \"nativeCurrency\": { \"name\": \"Sepolia Ether\", \"symbol\": \"ETH\", \"decimals\": 18 },\n      \"relations\": { \"mainnetChainId\": 1, \"parentChainId\": null },\n      \"rpcs\": { \"main\": { \"url\": \"https://sepolia-rpc.example.com\" } },\n      \"explorers\": {\n        \"scan\": { \"root\": \"https://sepolia.explorer.example\", \"block\": \"/block/:block\",\n                  \"address\": \"/address/:address\", \"tx\": \"/tx/:tx\", \"nft\": null }\n      },\n      \"contracts\": {\n        \"Registry\": { \"address\": \"0x0000000000000000000000000000000000000001\",\n                      \"blockCreated\": 1, \"abiUrl\": \"./Registry.json\" },\n        \"Staking\": null\n      }\n    }\n  }\n}\n```\n\n构建浏览器链接（TypeScript）：\n\n```ts\nconst e = config.networks[\"11155111\"].explorers.scan;\nconst url = e.root + e.tx!.replace(\":tx\", txHash);\n```\n\n## 需要注意\n\n- 状态为 **Draft**。\n- 文件中只应放置公开数据。绝不要包含私钥或助记词。规范允许为 RPC 提供 API 密钥扩展，但此类密钥**不得**放入公开分发的配置中。\n- 在同一文件中，合约名称必须在所有网络上指代同一个合约；最好与 Solidity 合约名一致。\n- 没有定义标准的合约名称；每个 dapp 自行选择。\n- 它所对齐的 [EIP-3085](/eip-3085/) 本身已是 Stagnant 状态。\n"}}}
