---
eip: 2228
label: EIP-2228
title: Canonicalize the name of network ID 1 and chain ID 1
status: Final
type: Informational
created: 2019-08-04
official: https://eips.ethereum.org/EIPS/eip-2228
source: https://github.com/ethereum/EIPs/blob/master/EIPS/eip-2228.md
canonical: https://eips.huatuo.xyz/ja/eip-2228/
lang: ja
tldr: ネットワーク ID 1・チェーン ID 1 の Ethereum ネットワークの正式名称を「Ethereum Mainnet」（または単に「Mainnet」）と定め、常に固有名詞として表記する。
tags: [naming, mainnet, chain-id, informational, style]
---

# EIP-2228: Canonicalize the name of network ID 1 and chain ID 1

> The Ethereum network with network ID 1 and chain ID 1 is named Ethereum Mainnet.

**TL;DR:** ネットワーク ID 1・チェーン ID 1 の Ethereum ネットワークの正式名称を「Ethereum Mainnet」（または単に「Mainnet」）と定め、常に固有名詞として表記する。

## 何を解決するのか

本番の Ethereum ネットワークは、「main net」「mainnet」「Main net」「Mainnet」「Main Ethereum Network」など、さまざまに表記されていました。EIP、クライアント、ウォレットごとに綴りが異なり、同じ著者の文書の中でも揺れていることがありました。これは見栄えが悪く、また「メインネットワーク」は曖昧になりえます。別のチェーンについてのページでは、*そのチェーン*のメインネットワークを指す可能性があるからです。

EIP-2228 は、正式名称を 1 つに決めます。

## 仕組み

- **ネットワーク ID 1・チェーン ID 1**（チェーン ID は [EIP-155](/eip-155/) 由来）のネットワークは **Ethereum Mainnet** と呼びます。文脈が明らかに Ethereum の場合は **Mainnet** とします。
- これは**固有名詞**です。先頭の "M" は大文字で、1 語です。
- それ以外の綴りや大文字小文字の使い方をしてはなりません（SHALL NOT）。
- UI が全大文字や全小文字で表示される場合は、ソース上では "Mainnet" と書き、スタイリングで表示を変えます。これにより意味上の名称が正しく保たれます。

仕様の例:

| テキスト | 可否 | 理由 |
| --- | --- | --- |
| "The contract was deployed to Ethereum Mainnet." | 可 | ネットワークを名指ししている |
| "This Dapp was deployed to Mainnet." | 可 | 文脈が明らかに Ethereum |
| "The main network on Ethereum is Mainnet." | 可 | "main" は記述的な語で、"Mainnet" が名称 |
| "Deploy your contract to the Ethereum main network." | 不可 | 文脈に依存し、正確さに欠ける |
| "Connect to mainnet." | 不可 | 小文字の "mainnet" は単語ではない |

仕様には、「Main Ethereum Network」を使っていた MetaMask がこれに従うよう更新されたこと、また表現が一貫していない古い EIP の一覧が記録されています。

## サンプルコード

UI でネットワークにラベルを付ける例。正式名称はデータとして保持し、大文字小文字は CSS で適用します（説明用）:

```ts
const NETWORK_NAMES: Record<number, string> = {
  1: "Ethereum Mainnet",
};

function networkLabel(chainId: bigint | number): string {
  return NETWORK_NAMES[Number(chainId)] ?? `Chain ${chainId}`;
}

// const { chainId } = await provider.getNetwork();
// header.textContent = networkLabel(chainId);
```

```html
<!-- Shows "SWITCH TO MAINNET" but the text is still the proper noun -->
<button style="text-transform: uppercase">Switch to Mainnet</button>
```

## 知っておくべきこと

- **Final**、Informational です。規定するのは表現であり、プロトコルの挙動ではありません。
- ライブラリは内部では引き続き小文字の識別子（たとえばネットワークキー `"mainnet"`）を使ってかまいません。この EIP が対象とするのは人が目にする名称です。
- 「Ethereum」は Ethereum Foundation の商標です。仕様は、使用上の義務について Foundation の規約を参照するよう示しています。
- 「Dapp」「dapp」「dApp」のどれを使うかは決めていません。


---

This is an unofficial plain-language summary. Read the full specification: https://eips.ethereum.org/EIPS/eip-2228
