Crate ethers_addressbook
source ·Expand description
§ethers-addressbook
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.
§Examples
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());
Structs§
- Wrapper around a hash map that maps a Chain to the contract’s deployed address on that chain.
Enums§
- An Ethereum EIP-155 chain.
Functions§
- Fetch the addressbook for a contract by its name. If the contract name is not a part of ethers-addressbook we return None.