{"id":"ERC-4804","name":"Web3 URL to EVM Call","status":"Final","chain":"both","category":{"id":"comprehension","name":"Comprehension & Display","description":"Making blockchain data readable to humans"},"journeyStages":[{"id":"specialized","name":"Specialized Interactions","description":"Physical items, AI, social, gaming"}],"uxImpact":"ERC-4804 defines web3:// URLs that compatible clients translate into read-only EVM calls. A client, extension or gateway must support the scheme and the target contract must expose an appropriate interface. The URL format alone does not provide native browser support, a universal resource-serving method or censorship-proof hosting.","officialUrl":"https://ercs.ethereum.org/ERCS/erc-4804","lastReviewed":"2026-09-18","lastUpdated":"2026-09-18","kind":"proposal","hasDetailedContent":true,"content":{"id":"ERC-4804","summary":"ERC-4804 defines web3:// URLs that compatible clients translate into read-only EVM calls. A client, extension or gateway must support the scheme and the target contract must expose an appropriate interface. The URL format alone does not provide native browser support, a universal resource-serving method or censorship-proof hosting.","applicability":{"whenToUse":["A compatible client or gateway can translate a web3:// link into the intended read-only call.","The target contract exposes a supported resource interface."],"whenToAvoid":["The user has no compatible client or acceptable gateway.","The product assumes the URL scheme guarantees safe content, availability or censorship immunity."]},"designerTakeaways":["Show which compatible client or gateway can open a web3:// link.","Keep the chain, target and any gateway visible before loading content.","Provide a fallback when the scheme, contract interface or resource is unsupported."],"problemsSolved":[{"problem":"Contract reads are hard to share as links","oldWay":"Send an address plus manual call instructions","newWay":"A compatible client translates a web3:// URL into a read-only EVM call","impact":"high"},{"problem":"Users cannot tell how a blockchain resource is loaded","oldWay":"Assume every browser can render the URL directly","newWay":"Explain required client support, gateway use and the contract resource interface","impact":"high"}],"uxPatterns":[{"name":"Open a web3 resource","description":"Use a compatible client with a clear fallback.","userFlow":["User selects a web3:// URL","Client checks scheme, target chain and supported resolve mode","Client translates the URL into the specified read-only EVM call","An appropriate interface supplies the response","Render supported content under the client trust policy or show an unsupported-resource state"]},{"name":"Gateway disclosure","description":"Make dependencies visible when an HTTPS gateway opens the URL.","userFlow":["Direct scheme support is unavailable","Offer a named compatible gateway or copy-link action","Explain which gateway will receive the request","Let the user choose whether to continue"]}],"uiComponents":[{"name":"Web3UrlInput","description":"Input field for web3:// URLs with validation","states":["empty","typing","valid","invalid","loading"],"props":["value","onChange","onNavigate","showChain"]},{"name":"ResourceSourceLabel","description":"Shows how the resource was retrieved, without claiming that its content is verified or safe.","states":["direct-call","gateway","external-resource","unknown"],"props":["chain","contract","sourceUrl"]},{"name":"Web3ContentFrame","description":"Renders a supported response under the client content-isolation policy","states":["loading","loaded","error","unsupported"],"props":["url","sandbox","onLoad","onError"]},{"name":"GatewayFallback","description":"HTTPS gateway link for non-web3 browsers","states":["available","generating","copied"],"props":["web3Url","gatewayDomain","onCopy"]}],"antiPatterns":[{"pattern":"Promising native browser support for every web3:// link","why":"The standard defines URL translation, not installed client support","instead":"Detect support and offer a clear client or gateway fallback","severity":"high"},{"pattern":"Treating on-chain retrieval as proof of safe content","why":"Contract responses and external resource dependencies can still be untrusted","instead":"Apply content isolation and show the source and trust boundaries","severity":"high"},{"pattern":"Hiding a gateway dependency","why":"A gateway receives the request and can affect resource availability or what the client sees","instead":"Name the gateway and offer a copy-link or compatible-client alternative","severity":"high"}],"keyTakeaways":["web3:// requires a compatible client or gateway.","ERC-4804 translates URLs to read-only EVM calls.","Use the actual target interface, including ERC-5219 where applicable.","Do not promise censorship immunity or safe executable content."],"technicalNotes":"ERC-4804 specifies URL-to-EVM-call translation with manual and auto resolve modes and path-derived calldata. It does not define a universal resolve(path, query) resource ABI. Response interpretation depends on the mode and target interface. ERC-5219 can provide an HTTP-like request/response interface. Name resolution, gateways, resource availability and browser support depend on the implementation.","specConstraints":[{"id":"read-only-boundary","constraint":"This specification defines read-only view semantics; state-modifying functions MAY be added as a future extension.","appliesTo":"application","normativity":"normative","specSection":"Specification","specUrl":"https://ercs.ethereum.org/ERCS/erc-4804#specification","designImplication":"Label web3:// results as reads and provide an unsupported or future-extension state for write actions rather than presenting a write control by default.","specQuote":"This specification only defines read-only (i.e. Solidity's `view` functions) semantics. State modifying functions may be defined as a future extension."},{"id":"optional-query-component","constraint":"The query component is OPTIONAL and contains attribute-value pairs.","appliesTo":"application","normativity":"normative","specSection":"Specification","specUrl":"https://ercs.ethereum.org/ERCS/erc-4804#specification","designImplication":"Parse URLs with and without query parameters, and make an absent query state visible instead of showing a malformed request.","specQuote":"- **query** is an optional component containing a sequence of attribute-value pairs separated by \"&\"."},{"id":"returns-alias-compatibility","constraint":"The returnTypes alias is NOT RECOMMENDED for new URLs and is retained mainly for backward-compatible use.","appliesTo":"application","normativity":"normative","specSection":"Specification > Resolve Mode > Auto Mode","specUrl":"https://ercs.ethereum.org/ERCS/erc-4804#auto-mode","designImplication":"Author and display the returns attribute for new links while parsing returnTypes for compatibility and labeling any fallback behavior.","specQuote":"- **returns** attribute in **query** tells the format of the returned data. If not specified, the returned message data will be parsed in \"(bytes32)\" and MIME will be set based on the suffix of the last argument. If **returns** is \"()\", the returned data will be parsed in raw bytes in JSON.  Otherwise, the returned message will be parsed in the specified **returns** attribute in JSON.  If multiple **returns** attributes are present, the value of the last **returns** attribute will be applied. Note that **returnTypes** is the alias of **returns**, but it is not recommended to use and is mainly for backward-compatible purpose."},{"id":"human-readable-url","constraint":"Web3 URLs SHOULD remain human-readable, using readable name-service names and method arguments instead of raw calldata where supported.","appliesTo":"application","normativity":"rationale","specSection":"Rationale","specUrl":"https://ercs.ethereum.org/ERCS/erc-4804#rationale","designImplication":"Show readable names and method arguments in link previews and editors, while retaining an inspectable raw-call fallback.","specQuote":"- **Human-readable**.  The Web3 URL should be easily recognized by human similar to Web2 URL (`http://`).  As a result, we support names from name services to replace address for better readability.  In addition, instead of using calldata in hex, we use human-readable method + arguments and translate them to calldata for better readability."},{"id":"http-url-compatibility","constraint":"Web3 URLs SHOULD remain compatible with HTTP-URL conventions such as relative paths, query, and fragments.","appliesTo":"application","normativity":"rationale","specSection":"Rationale","specUrl":"https://ercs.ethereum.org/ERCS/erc-4804#rationale","designImplication":"Preserve familiar path, query, and fragment navigation and make unsupported browser behavior explicit in fallback UI.","specQuote":"- **Maximum-Compatible with HTTP-URL standard**.  The Web3 URL should be compatible with HTTP-URL standard including relative pathing, query, fragment, etc so that the support of existing HTTP-URL (e.g., by browser) can be easily extended to Web3 URL with minimal modification.  This also means that existing Web2 users can easily migrate to Web3 with minimal extra knowledge of this standard."}],"lastUpdated":"2026-09-18","lastReviewed":"2026-09-18","sources":[{"label":"ERC-4804 official specification","url":"https://ercs.ethereum.org/ERCS/erc-4804","type":"official-spec"}]},"sources":[{"label":"Official specification","url":"https://ercs.ethereum.org/ERCS/erc-4804","type":"official-spec"},{"label":"Discussion search","url":"https://ethereum-magicians.org/search?q=ERC-4804","type":"discussion"}],"urls":{"canonical":"https://www.eipsfordesigners.com/standards/ERC-4804","markdown":"https://www.eipsfordesigners.com/standards/ERC-4804/content.md","agent":"https://www.eipsfordesigners.com/standards/ERC-4804/agent.md","api":"https://www.eipsfordesigners.com/api/standards/ERC-4804","official":"https://ercs.ethereum.org/ERCS/erc-4804","discussion":"https://ethereum-magicians.org/search?q=ERC-4804"},"freshness":{"lastReviewed":"2026-09-18","lastUpdated":"2026-09-18"}}