Skip to main content

Supported Networks

ERC-8004 contracts are deployed via CREATE2, so all mainnets share the same addresses and all testnets share the same addresses.

Mainnets

NetworkChain IDCAIP-2 ID
Ethereum1eip155:1
Base8453eip155:8453
Polygon137eip155:137
Arbitrum One42161eip155:42161
Celo42220eip155:42220
Gnosis100eip155:100
Scroll534352eip155:534352
Taiko (Alethia)167000eip155:167000
Monad143eip155:143
BNB Smart Chain56eip155:56

Testnets

NetworkChain IDCAIP-2 ID
Ethereum Sepolia11155111eip155:11155111
Base Sepolia84532eip155:84532
Polygon Amoy80002eip155:80002
Arbitrum Sepolia421614eip155:421614
Celo Alfajores44787eip155:44787
Scroll Sepolia534351eip155:534351
Monad Testnet10143eip155:10143
BNB Smart Chain Testnet97eip155:97

Usage

Select a network when creating the client:

use erc8004::{Erc8004, Network};

// Mainnet
let client = Erc8004::new(provider).with_network(Network::EthereumMainnet);
let client = Erc8004::new(provider).with_network(Network::Base);
let client = Erc8004::new(provider).with_network(Network::Polygon);

// Testnet
let client = Erc8004::new(provider).with_network(Network::BaseSepolia);
let client = Erc8004::new(provider).with_network(Network::EthereumSepolia);

Multi-network Queries

Query the same registry across multiple chains:

use erc8004::{Erc8004, Network};
use alloy::primitives::U256;

let networks = [Network::EthereumMainnet, Network::Base, Network::Polygon];

for network in networks {
let provider = create_provider_for(network);
let client = Erc8004::new(provider).with_network(network);
let identity = client.identity()?;

match identity.token_uri(U256::from(1)).await {
Ok(uri) => println!("{network:?}: {uri}"),
Err(_) => println!("{network:?}: not found"),
}
}

Custom Network

For networks not in the built-in list, provide contract addresses manually:

use alloy::primitives::address;

let client = Erc8004::new(provider)
.with_identity_address(address!("0x…"))
.with_reputation_address(address!("0x…"))
.with_validation_address(address!("0x…"));