web3://

Motivation

With the advancements in Ethereum scalability, including our “Super World Computer” initiative, the ecosystem is progressing toward broad adoption of fully on-chain applications. However, a critical component remains underdeveloped: a decentralized protocol that enables direct access to on-chain resources, such as NFT images and dynamic websites hosted within smart contracts.

To address this need, we have introduced a new standard for defining HTTP-style web3:// links through ERC-4804 and ERC-6860. This protocol allows seamless navigation to dynamic on-chain resources governed by smart contracts, effectively transforming the Ethereum Virtual Machine (EVM) into a decentralized, unstoppable HTTP server.

When combined with the programmable storage provided by EthStorage, this approach lays the groundwork for a fully decentralized web (Web3), a reimagined internet that replaces centralized entities with permissionless protocols. Our aim is to establish a resilient, censorship-resistant infrastructure that inherently provides direct access to decentralized resources.

How It Works

URL structure

web3://<contract>[:<chainId>]/<path>

The URLs are following a structure close to traditional HTTP URLs:

  • <contract> can either be a contract address such as 0x5ad14e8439b9619e165db27545faf6df13e2b947 or a domain name such as web3url.eth. Learn more about domain name resolutionarrow-up-right.

  • chainId is optional and indicates the chain id of the blockchain where to query the smart contract. web3://0x5a985f13345e820aa9618826b85f74c3986e1463:5/tokenHTML/2 will for example query on the goerli blockchain (chain id = 5).

  • path follows a similar structure than traditional HTTP URLs, in the form of /path/path2?query1=xx&query2=xx. To know how to build a path, we first need to know the resolve mode of the called smart contractarrow-up-right

Standards

The web3:// protocol is made of various Ethereum ERCs, some of which are still in draft status. We will flag on this documentation what is definitive and what could change.

Here is the list of ERCs :

Examples

Access an on-chain website

This on-chain website is located in the 0x5ad14e8439b9619e165db27545faf6df13e2b947 smart contract in the QuarkChain L2 testnet blockchain.

⏩ Try now with a web3:// gatewayarrow-up-right, or with the others web3:// clients

Get a NFT

This URL will fetch the HTML of the NFT number 9352 of the Terraforms NFT collection located at 0x4e1f41613c9084fdb9e34e11fae9412427480e56arrow-up-right on the Ethereum mainnet blockchain.

⏩ Try now with a web3:// gatewayarrow-up-right, or with the others web3:// clients

Fetch an USDC balance

This URL will fetch the balance of USDC of the account nemorino.eth.

⏩ Try now with a web3:// gatewayarrow-up-right, or with the others web3:// clients

Additional Resources

Last updated