{"id":"EIP-695","name":"eth_chainId Method","status":"Final","chain":"both","category":{"id":"comprehension","name":"Comprehension & Display","description":"Making blockchain data readable to humans"},"journeyStages":[{"id":"discovery","name":"Discovery & Connection","description":"Finding and connecting wallet to dApp"},{"id":"status","name":"Status & Confirmation","description":"Waiting for and confirming outcomes"}],"uxImpact":"EIP-695 defines the eth_chainId RPC method, which lets a provider report the chain ID used by the connected endpoint. A client can compare that value with its target network, while wallet support, endpoint trust, network names, and switching remain separate concerns.","officialUrl":"https://eips.ethereum.org/EIPS/eip-695","lastReviewed":"2026-09-18","lastUpdated":"2026-09-18","kind":"proposal","hasDetailedContent":true,"content":{"id":"EIP-695","summary":"EIP-695 defines the eth_chainId RPC method, which lets a provider report the chain ID used by the connected endpoint. A client can compare that value with its target network, while wallet support, endpoint trust, network names, and switching remain separate concerns.","applicability":{"whenToUse":["Your client compares the wallet-reported chain ID with the app’s target network.","A network change needs a visible mismatch or reconnect state."],"whenToAvoid":["You need to authenticate an RPC endpoint; its own chain-ID response cannot do that.","You need a network-switching method or signature replay protection from this query alone."]},"designerTakeaways":["Query eth_chainId and compare the reported value with the app's target chain.","Show the network name and chain ID together, then update both after a provider change.","Keep endpoint trust, wallet switching, and signature replay protection as separate concerns."],"problemsSolved":[{"problem":"No reliable way to identify the network","oldWay":"net_version returned network ID which differed from chain ID","newWay":"eth_chainId returns the actual chain ID used in signatures","impact":"critical"},{"problem":"Apps couldn't verify correct network connection","oldWay":"Guess based on other RPC calls, often wrong","newWay":"Direct query: \"What chain ID is this?\"","impact":"high"},{"problem":"Wallet network display was inconsistent","oldWay":"Different wallets showed different identifiers","newWay":"A client can compare the endpoint-reported chain ID with its target, subject to provider support","impact":"high"},{"problem":"Wrong network transactions were common","oldWay":"User thinks they're on mainnet, actually on testnet","newWay":"Apps can gate actions on a reported chain-ID match while separately handling endpoint trust and wallet switching","impact":"medium"}],"uxPatterns":[{"name":"Network Connection Status","description":"Show current network with chain ID verification","userFlow":["User connects wallet","App calls eth_chainId","Network name + chain ID displayed","Show whether the reported chain ID matches the app target, without a trust badge","User sees the reported network and any mismatch"]},{"name":"Network Verification Gate","description":"Block actions until correct network confirmed","userFlow":["App requires specific chain ID","User connected to different chain","Clear comparison shown","One-click switch option","App unblocks after switch"]},{"name":"Network Selector Dropdown","description":"Easy network switching with chain IDs visible","userFlow":["User clicks network selector","All available networks shown","Chain ID visible for each","Click to switch","Wallet handles the switch"]}],"uiComponents":[{"name":"ChainIdDisplay","description":"Shows the endpoint-reported chain ID and whether it matches the app target","states":["matches-target","mismatch","unavailable"],"props":["chainId","chainName","showVerification"]},{"name":"NetworkSelector","description":"Dropdown for switching networks","states":["idle","open","switching"],"props":["networks[]","currentChainId","onSelect"]},{"name":"NetworkGate","description":"Blocks UI until correct network selected","states":["blocked","switching","unblocked"],"props":["requiredChainId","currentChainId","onSwitch"]}],"antiPatterns":[{"pattern":"Not verifying chain ID after connection","why":"User might connect on wrong network, lose funds or get errors","instead":"Call eth_chainId after connection and when the provider reports a chain change","severity":"critical"},{"pattern":"Only showing network name without chain ID","why":"Network labels can be ambiguous, and an untrusted RPC can also return the expected numeric ID","instead":"Show the name and chain ID, compare with the app target, and use a trusted RPC configuration; the ID response is not endpoint authentication","severity":"high"},{"pattern":"Using net_version instead of eth_chainId","why":"net_version can differ from chain ID used in signatures","instead":"Use eth_chainId for chain identification and keep net_version as a separate legacy value","severity":"high"},{"pattern":"Silently failing on wrong network","why":"User doesn't know why app isn't working","instead":"Clear \"Please switch to [Network]\" message with action button","severity":"medium"}],"relatedStandards":[{"id":"EIP-155","relationship":"EIP-155 introduced chain ID in signatures, EIP-695 provides the query method"},{"id":"EIP-1344","relationship":"EIP-1344 makes chain ID available to smart contracts via opcode"},{"id":"EIP-1193","relationship":"The provider API through which eth_chainId is called"}],"specConstraints":[{"id":"chain-id-preference","constraint":"Consumers should use eth_chainId rather than net_version to identify the chain they are communicating with.","appliesTo":"application","normativity":"security-considerations","specQuote":"Consumers should prefer `eth_chainId` over `net_version`, so that they can reliably identify chain they are communicating with.","specSection":"Security Considerations","specUrl":"https://eips.ethereum.org/EIPS/eip-695#security-considerations","designImplication":"Show the reported chain ID beside the network label and compare it with the app target. Treat that comparison as chain context, not as proof that the RPC endpoint itself is trustworthy."}],"lastUpdated":"2026-09-18","technicalNotes":"eth_chainId reports the configured signing chain ID as a hexadecimal quantity. It does not authenticate the RPC or prove that returned data is genuine. Network switching is a separate wallet capability. Replay protection comes from the transaction/signature format and verification, not from querying this method.","lastReviewed":"2026-09-18","sources":[{"label":"EIP-695 official specification","url":"https://eips.ethereum.org/EIPS/eip-695","type":"official-spec"}]},"sources":[{"label":"Official specification","url":"https://eips.ethereum.org/EIPS/eip-695","type":"official-spec"},{"label":"Discussion search","url":"https://ethereum-magicians.org/search?q=EIP-695","type":"discussion"}],"urls":{"canonical":"https://www.eipsfordesigners.com/standards/EIP-695","markdown":"https://www.eipsfordesigners.com/standards/EIP-695/content.md","agent":"https://www.eipsfordesigners.com/standards/EIP-695/agent.md","api":"https://www.eipsfordesigners.com/api/standards/EIP-695","official":"https://eips.ethereum.org/EIPS/eip-695","discussion":"https://ethereum-magicians.org/search?q=EIP-695"},"freshness":{"lastReviewed":"2026-09-18","lastUpdated":"2026-09-18"}}