Crates.io | ethers-addressbook |
lib.rs | ethers-addressbook |
version | 2.0.14 |
source | src |
created_at | 2022-05-13 20:41:18.175546 |
updated_at | 2024-03-06 17:16:55.949514 |
description | Common Ethereum name to address mappings |
homepage | https://github.com/gakonst/ethers-rs |
repository | https://github.com/gakonst/ethers-rs |
max_upload_size | |
id | 586082 |
size | 6,655 |
A collection of commonly used smart contract addresses.
For more information, please refer to the book.
Warning
This library is in the process of being deprecated. See #2667 for more information.
use ethers_addressbook::{contract, Chain};
let weth = contract("weth").unwrap();
let mainnet_address = weth.address(Chain::Mainnet).unwrap();
assert_eq!(mainnet_address, "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2".parse().unwrap());