[!IMPORTANT] eth-icons uses third party services to fetch iconography, not ethereum rpc calls.
Network (Mainnet, Sepolia, etc.), Native Asset (ETH, sepETH, etc.), and ERC20 (wETH, etc.) icons are an inherit non-standardized extension of the ethereum protocol. To allow for easily integrating these into your application eth-icons aims to bring a set of helpers to obtain iconography from various sources.
Quickstart
use ;
// Create a client
let client = client;
// Create an icon client
let icons = builder
.with_reqwest
.with_defaults;
let weth = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
let weth_icons = icons.resolve.await;
Data Sources
Currently supported data sources include:
- Avara - supports ERC20s
- Blockscout - supports ERC20s
- SafeWallet - supports network and native token icons
- Smoldapp - supports network, native tokens, and ERC20s
- Zerion - supports ERC20s
Selecting Sources
Every source is opt-in by default.
use ;
pub async
Documentation
You can read the documentation at docs.rs/eth-icons.