Introduction
Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.
I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.
I also build and publish a variety of tools, libraries, and open-source projects.
This article examines Web3 URL to EVM Call Message Translation.
ERC-6860 proposes using the Web3 URL protocol to access EVM smart contracts directly from a browser and retrieve on-chain content such as HTML, CSS, and images.
This article translates, summarizes, and expands on the specification below.
Overview
ERC-6860 is a protocol for translating HTTP-style Web3 URLs (for example, web3://uniswap.eth/) into EVM call messages.
It converts RFC 3986-compliant URIs into EVM messages, specifying the destination address and calldata parameters.
The standard updates ERC-4804, with several corrections and clarifications.
For more on ERC-4804, see the following article.
[ERC-4804] Calling Contracts Through HTTP-Style Web3 URLs
Web3 URLs allow users to access on-chain content directly without relying on Web2 proxies such as dApp websites or node service providers.
Supported content types include HTML, CSS, JavaScript, SVG, PNG, JPG, and other formats commonly used on the web. This allows the EVM to act as a decentralized backend for websites hosted entirely on-chain.
Motivation
The proposal addresses the following problems.
Dependence on Web2 proxies
Reading data from Web3 typically depends on translation by Web2 proxies. This translation is generally performed by dApp websites, node service providers, or proxies such as Etherscan, outside the user's control.
Such centralized dependencies run counter to the decentralization goals of Web3. A proxy can become unavailable, censor content, or provide inaccurate information.
Direct access to on-chain content
ERC-6860 aims to give Web2 users a straightforward way to access Web3 content directly. In particular, it makes on-chain web content such as SVG and HTML accessible through human-readable URLs.
By integrating domain name resolution services such as ENS (Ethereum Name Service) while remaining compatible with the existing URI standard (RFC 3986), it allows users to access smart contracts through intuitive URLs such as web3://uniswap.eth/.
Specification
URL structure
The basic Web3 URL syntax is as follows.
web3URL = schema "://" [ userinfo "@" ] contractName [ ":" chainid ] pathQuery [ "#" fragment ]The components are described below.
| Component | Required | Description |
|---|---|---|
| schema | Yes | "w3" or "web3" |
| userinfo | No | Sender address; defaults to 0x0 |
| contractName | Yes | Ethereum address (0x...) or ENS domain name |
| chainid | No | Network identifier; defaults to mainnet (1) |
| pathQuery | Yes | Path and optional query parameters |
| fragment | No | Reference string; not sent to the smart contract |
Example Web3 URLs:
web3://uniswap.eth/
web3://cyberbrokers-meta.eth/renderBroker/9999
web3://vitalikblog.eth:5/
web3://0x1234...abcd:11155111/tokenURI/1?returns=(string)The first example uses an ENS domain for basic access. The second includes a method call and argument. The third explicitly specifies a chain ID. The fourth uses an address directly and specifies the return type.
Determining the resolve mode
A contract can implement the resolveMode() function to specify how URLs should be interpreted.
This function returns a bytes32 value.
The resolveMode() function is defined as follows.
function resolveMode() external returns (bytes32);The function determines how the contract handles Web3 URLs.
The return values correspond to the following modes.
| Return value | Mode | Description |
|---|---|---|
| "manual" (0x6d616e75616c...) | Manual | pathQuery becomes calldata directly |
| "auto" (0x6175746f...), zero, or not implemented | Automatic | Interpreted according to the Solidity ABI |
| Other | Error | The request fails |
Manual mode
In manual mode, the bytes of pathQuery are used directly as calldata. Percent-encoded values are not decoded. If pathQuery is empty, calldata defaults to "/" (0x2f).
The manual-mode syntax is as follows.
mPath = [ *( "/" segment ) "/" segment [ "." fileExtension ] ]
mQuery = *( pchar / "/" / "?" )Handling return values
In manual mode, the return value is treated as ABI-encoded bytes and decoded before being delivered to the frontend.
The file extension determines the MIME type. If there is no extension, the default is text/html.
For example, web3://example.eth/image.png is interpreted as having the MIME type image/png.
Automatic mode
In automatic mode, pathQuery is interpreted according to the standard Solidity ABI. This enables human-readable method calls.
Path structure
The automatic-mode path structure is as follows.
aPath = [ "/" [ method *( "/" argument ) ] ]method is the Solidity function name, and argument is an argument to that function.
Arguments are separated by "/".
Supported argument types
Automatic mode supports the following argument types.
| Type | Format | Example |
|---|---|---|
| bool | "true" or "false" | true |
| uint/uint<X> | Decimal number (X: 8-256) | 123 |
| int/int<X> | Signed decimal number | -456 |
| address | 0x-prefixed 20-byte hexadecimal value or domain name | 0x1234... or vitalik.eth |
| bytes/bytes<X> | 0x-prefixed hexadecimal value (X: 1-32) | 0xabcd... |
| string | Text (optionally with a file extension) | hello.txt |
Automatic type detection
If a type is not explicitly specified, it is inferred in the following order.
| Priority | Input pattern | Inferred type |
|---|---|---|
| 1 | Decimal digits only | uint256 |
| 2 | 32-byte hexadecimal value (0x...) | bytes32 |
| 3 | 20-byte hexadecimal value (0x...) | address |
| 4 | Other hexadecimal value | bytes |
| 5 | "true" or "false" | bool |
| 6 | Anything else | address (parsed as a domain name) |
Patterns are tested in priority order, and the type of the first matching pattern is used.
Example
An example of automatic mode:
web3://cyberbrokers-meta.eth/renderBroker/9999This calls the cyberbrokers-meta.eth contract's renderBroker function with the argument 9999.
9999 is automatically interpreted as uint256.
Handling return values
In automatic mode, query parameters specify how return values should be handled.
| Query parameter | Behavior |
|---|---|
No returns attribute |
Returns ABI-decoded bytes. The MIME type is determined only if the final argument is a string containing a file extension |
returns=() |
Returns a raw hexadecimal string in a JSON array |
returns=(types) |
ABI-decodes the result according to the specified types and returns it in JSON-RPC format |
An example of return-value handling:
web3://0x1234.../balanceOf/vitalik.eth?returns=(uint256)In this example, the return value of balanceOf is interpreted as uint256 and returned in JSON-RPC format (a 0x-prefixed hexadecimal number).
In JSON-RPC format, integers are returned as hexadecimal strings, while booleans and strings use their native JSON representations.
Practical examples
The following examples illustrate how Web3 URLs work.
Basic contract access
The simplest example is web3://w3url.eth/.
web3://w3url.eth/When accessing this URL, w3url.eth is first resolved through ENS to obtain the contract address.
The client then calls resolveMode() to determine whether the contract uses manual or automatic mode.
Because the path is empty (only "/"), the default content is returned.
Retrieving NFT metadata
Here is an example of retrieving metadata from an NFT project.
web3://cyberbrokers-meta.eth/renderBroker/9999This calls the cyberbrokers-meta.eth contract's renderBroker function with token ID 9999.
Because the argument 9999 consists entirely of digits, it is automatically interpreted as uint256.
The return value is ABI-encoded bytes, typically containing metadata such as SVG or JSON.
Accessing another chain
To access a chain other than mainnet, explicitly specify its chain ID.
web3://vitalikblog.eth:5/Here, :5 specifies the Goerli testnet (chain ID 5).
ENS domain resolution also takes place on Goerli in this example.
Specifying return types
Here is an example of retrieving an ERC-20 token balance.
web3://0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/balanceOf/vitalik.eth?returns=(uint256)This URL accesses the USDC contract (0xA0b86991...) by calling its balanceOf function with vitalik.eth as its argument.
vitalik.eth is resolved through ENS as an address argument and converted into an address.
The ?returns=(uint256) parameter causes the return value to be interpreted as uint256 and returned in JSON-RPC format (a hexadecimal string such as "0x...").
Multiple return values
For functions with multiple return values, specify the types in parentheses, separated by commas.
web3://example.eth/getInfo/1?returns=(string,uint256,bool)This example expects three return values (string, uint256, and bool). The result is a JSON array in which each element uses the JSON representation appropriate to its type.
Additional details
ABNF grammar
ERC-6860 defines the complete Web3 URL syntax in ABNF (Augmented Backus-Naur Form). ABNF is a grammar notation widely used in Internet standards and defined in RFC 5234.
The principal grammar definitions are as follows.
web3URL = schema "://" [ userinfo "@" ] contractName [ ":" chainid ] pathQuery [ "#" fragment ]
schema = "w3" / "web3"
userinfo = address
contractName = address / domainName
chainid = 1*DIGITThis base syntax applies to all Web3 URLs.
schema is either "w3" or "web3", and contractName specifies an Ethereum address or a domain name such as an ENS name.
The manual-mode path syntax is defined as follows.
mPathQuery = mPath [ "?" mQuery ]
mPath = [ *( "/" segment ) "/" segment [ "." fileExtension ] ]
mQuery = *( pchar / "/" / "?" )
fileExtension = 1*( ALPHA / DIGIT )In manual mode, the path becomes calldata directly, so arbitrary segment structures are allowed.
File extensions such as .html and .png are used to determine the MIME type.
The automatic-mode path syntax is defined as follows.
aPath = [ "/" [ method *( "/" argument ) ] ]
method = ALPHA *( ALPHA / DIGIT )
argument = boolArg / uintArg / intArg / addressArg / bytesArg / stringArgIn automatic mode, the method name and arguments are separated by slashes. Each argument is written in the format appropriate to its type.
The syntax for specifying return types is as follows.
aQuery = "?" "returns" "=" "(" [ retTypes ] ")"
retTypes = retType *( "," retType )
retType = "(" retTypes ")" / "bool" / "uint" [ "8" / "16" / ... / "256" ] / "int" [ "8" / ... ] / "address" / "bytes" [ "1" / ... / "32" ] / "string"The returns parameter allows the client to explicitly specify the expected return types.
This ensures that raw bytes from the contract are decoded appropriately and returned in JSON format.
Design principles
ERC-6860 is built around four core principles.
Human readability: use ENS names instead of raw addresses and method syntax instead of hexadecimal calldata. This meets the expectations of users familiar with HTTP URLs.
HTTP compatibility: follow URL conventions such as relative paths, query strings, fragments, and percent encoding to simplify browser integration.
Simplicity: automatic type detection keeps URLs short while still allowing explicit type declarations when needed.
Flexibility: contracts control how encoding is interpreted, allowing fine-grained customization of resource locations.
Domain name resolution
If contractName is a domain name, it is resolved as follows.
- Resolve the domain name using ENS (Ethereum Name Service).
- Use mainnet (chainid=1) if no chain ID is specified.
- Send an EVM message to the resolved address.
For example, web3://uniswap.eth/ first resolves uniswap.eth through ENS and then sends a call message to the resulting address.
Scope
The specification defines only read-only semantics (Solidity view functions).
State-changing functions may be defined in future extensions.
Backwards compatibility
ERC-6860 explicitly replaces ERC-4804. The principal changes are as follows.
| Item | ERC-4804 | ERC-6860 |
|---|---|---|
| Protocol names | Includes "ethereum-web3://" and "eth-web3://" | Removes those names; only "web3://" and "w3://" remain |
| Automatic-mode return type | Treated as bytes32 | Treated as bytes |
| Supported types | uint256, bytes32, address, bytes, string | Adds int8-int256, uint8-uint256, bytes1-bytes32 |
| Integer encoding | String representation | JSON-RPC format (0x-prefixed hexadecimal) |
| Manual-mode path interpretation | No interpretation | MIME type determined from the file extension |
These changes provide broader type support and greater consistency with the JSON-RPC standard.
Security
The ERC-6860 specification does not list any special security considerations.
As with other Web3 applications, however, users should consider the following risks.
Contract trustworthiness: verify that the contract being accessed is trustworthy. A malicious contract may return deceptive content.
ENS resolution: if ownership of an ENS domain changes, the domain may redirect users to a different contract.
References
Conclusion
This article covered Web3 URL to EVM Call Message Translation.





