EIP-2228 · Final · Informational · 2019-08-04
EIP-2228: Canonicalize the name of network ID 1 and chain ID 1
Sets the official name of the Ethereum network with network ID 1 and chain ID 1: "Ethereum Mainnet", or just "Mainnet", always written as a proper noun.
What problem does it solve?
The production Ethereum network was written in many ways: "main net", "mainnet", "Main net", "Mainnet", "Main Ethereum Network". Different EIPs, clients and wallets used different spellings, sometimes even within the same author's documents. That looks unprofessional, and "the main network" can be ambiguous: on a page about another chain it could refer to that chain's main network.
EIP-2228 picks one canonical name.
How it works
- The network with network ID 1 and chain ID 1 (chain ID from EIP-155) is named Ethereum Mainnet, or Mainnet when the context is clearly Ethereum.
- It is a proper noun: capital "M", one word.
- Other spellings and capitalisations SHALL NOT be used.
- In all-caps or all-lowercase UI, write "Mainnet" in the source and apply the case with styling, so the semantic name stays correct.
Examples from the spec:
| Text | OK? | Why |
|---|---|---|
| "The contract was deployed to Ethereum Mainnet." | Yes | Names the network |
| "This Dapp was deployed to Mainnet." | Yes | Context is clearly Ethereum |
| "The main network on Ethereum is Mainnet." | Yes | "main" is descriptive, "Mainnet" the name |
| "Deploy your contract to the Ethereum main network." | No | Context-dependent, less precise |
| "Connect to mainnet." | No | Lowercase "mainnet" is not a word |
The spec records that MetaMask, which used "Main Ethereum Network", was updated to follow it, and lists older EIPs whose wording is inconsistent.
Sample code
Labelling networks in a UI, keeping the canonical name in data and applying case in CSS (illustrative):
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);
<!-- Shows "SWITCH TO MAINNET" but the text is still the proper noun -->
<button style="text-transform: uppercase">Switch to Mainnet</button>
Things to know
- Final, Informational: it governs wording, not protocol behaviour.
- Libraries may still use lowercase identifiers internally (for example a network key
"mainnet"); the EIP is about human-facing names. - "Ethereum" is a trademark of the Ethereum Foundation. The spec points to the Foundation's terms for usage obligations.
- It does not choose between "Dapp", "dapp" or "dApp".