From cd28eb26681bd18dfafe8b8d0e8494696ac6fd04 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 Jan 2022 12:14:27 +0800 Subject: [PATCH 1/7] feat: macro and token (simplest form) --- Cargo.lock | 9 +++++ Cargo.toml | 2 ++ ethers-core/src/types/chain.rs | 2 +- ethers-tokenlist/Cargo.toml | 10 ++++++ ethers-tokenlist/src/lib.rs | 61 ++++++++++++++++++++++++++++++++++ 5 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 ethers-tokenlist/Cargo.toml create mode 100644 ethers-tokenlist/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index 40201f11a..4fe641599 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1349,6 +1349,15 @@ dependencies = [ "walkdir", ] +[[package]] +name = "ethers-tokenlist" +version = "0.1.0" +dependencies = [ + "ethers-core", + "serde", + "serde_json", +] + [[package]] name = "ethers-wasm" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 7b07c0d87..9d7254bdf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,6 +21,7 @@ members = [ "ethers-middleware", "ethers-etherscan", "ethers-solc", + "ethers-tokenlist", "examples/ethers-wasm", ] @@ -32,6 +33,7 @@ default-members = [ "ethers-middleware", "ethers-etherscan", "ethers-solc", + "ethers-tokenlist", ] [package.metadata.docs.rs] diff --git a/ethers-core/src/types/chain.rs b/ethers-core/src/types/chain.rs index 2a1ad9036..c16fc1125 100644 --- a/ethers-core/src/types/chain.rs +++ b/ethers-core/src/types/chain.rs @@ -8,7 +8,7 @@ use std::str::FromStr; #[error("Failed to parse chain: {0}")] pub struct ParseChainError(String); -#[derive(Debug, Clone, Copy, Eq, PartialEq)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] pub enum Chain { Mainnet, Ropsten, diff --git a/ethers-tokenlist/Cargo.toml b/ethers-tokenlist/Cargo.toml new file mode 100644 index 000000000..a44bbc60e --- /dev/null +++ b/ethers-tokenlist/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "ethers-tokenlist" +version = "0.1.0" +edition = "2021" + +[dependencies] +serde = { version = "1.0", features = ["derive"] } +serde_json = "1.0" + +ethers-core = { path = "../ethers-core" } diff --git a/ethers-tokenlist/src/lib.rs b/ethers-tokenlist/src/lib.rs new file mode 100644 index 000000000..a3ad3fa4b --- /dev/null +++ b/ethers-tokenlist/src/lib.rs @@ -0,0 +1,61 @@ +use ethers_core::types::{Address, Chain}; + +use std::{collections::HashMap, str::FromStr}; + +#[derive(Debug)] +pub struct Token { + symbol: String, + addresses: HashMap, +} + +impl Token { + pub fn symbol(&self) -> String { + self.symbol.clone() + } + + pub fn address(&self, chain: Chain) -> Option
{ + self.addresses.get(&chain).cloned() + } +} + +macro_rules! declare_token { + ( $token: ident, $( $chain_id: expr => $addr: expr ),* ) => { + pub fn $token() -> Token { + let mut addresses = HashMap::new(); + $( + addresses.insert( + Chain::from_str($chain_id).expect("invalid chain"), + Address::from_str($addr).expect("invalid address"), + ); + )* + + Token { + symbol: stringify!($token).to_string(), + addresses, + } + } + } +} + +declare_token!(dai, "mainnet" => "0x6b175474e89094c44da98b954eedeac495271d0f", "rinkeby" => "0x8ad3aa5d5ff084307d28c8f514d7a193b2bfe725"); +declare_token!(usdc, "mainnet" => "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"); + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_dai() { + let dai_token = dai(); + assert_eq!(dai_token.symbol(), "dai".to_string()); + assert_eq!( + dai_token.address(Chain::Mainnet), + Some(Address::from_str("0x6b175474e89094c44da98b954eedeac495271d0f").unwrap()) + ); + assert_eq!( + dai_token.address(Chain::Rinkeby), + Some(Address::from_str("0x8ad3aa5d5ff084307d28c8f514d7a193b2bfe725").unwrap()) + ); + assert_eq!(dai_token.address(Chain::Goerli), None); + } +} From c99de9e1d0b8611e7b472003459b7d3c580dd4b5 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 Jan 2022 16:00:54 +0800 Subject: [PATCH 2/7] fix: better structure to fetch token by string symbol --- Cargo.lock | 1 + ethers-core/src/types/chain.rs | 8 +++-- ethers-tokenlist/Cargo.toml | 1 + ethers-tokenlist/src/lib.rs | 61 ++++++++++++---------------------- ethers-tokenlist/tokens.json | 13 ++++++++ 5 files changed, 42 insertions(+), 42 deletions(-) create mode 100644 ethers-tokenlist/tokens.json diff --git a/Cargo.lock b/Cargo.lock index 4fe641599..d1f15d2bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1354,6 +1354,7 @@ name = "ethers-tokenlist" version = "0.1.0" dependencies = [ "ethers-core", + "once_cell", "serde", "serde_json", ] diff --git a/ethers-core/src/types/chain.rs b/ethers-core/src/types/chain.rs index c16fc1125..217e2d3bc 100644 --- a/ethers-core/src/types/chain.rs +++ b/ethers-core/src/types/chain.rs @@ -1,14 +1,16 @@ -use std::fmt; +use serde::Deserialize; use thiserror::Error; +use std::{fmt, str::FromStr}; + use crate::types::U256; -use std::str::FromStr; #[derive(Debug, Clone, Error)] #[error("Failed to parse chain: {0}")] pub struct ParseChainError(String); -#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash)] +#[derive(Debug, Clone, Copy, Eq, PartialEq, Hash, Deserialize)] +#[serde(rename_all = "snake_case")] pub enum Chain { Mainnet, Ropsten, diff --git a/ethers-tokenlist/Cargo.toml b/ethers-tokenlist/Cargo.toml index a44bbc60e..62bc06416 100644 --- a/ethers-tokenlist/Cargo.toml +++ b/ethers-tokenlist/Cargo.toml @@ -4,6 +4,7 @@ version = "0.1.0" edition = "2021" [dependencies] +once_cell = "1.9.0" serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" diff --git a/ethers-tokenlist/src/lib.rs b/ethers-tokenlist/src/lib.rs index a3ad3fa4b..03382f130 100644 --- a/ethers-tokenlist/src/lib.rs +++ b/ethers-tokenlist/src/lib.rs @@ -1,61 +1,44 @@ use ethers_core::types::{Address, Chain}; +use once_cell::sync::Lazy; +use serde::Deserialize; -use std::{collections::HashMap, str::FromStr}; +use std::{collections::HashMap, fs::File, io::BufReader}; -#[derive(Debug)] +static TOKENS: Lazy> = Lazy::new(|| { + let f = File::open("tokens.json").unwrap(); + let r = BufReader::new(f); + serde_json::from_reader(r).unwrap() +}); + +#[derive(Clone, Debug, Deserialize)] pub struct Token { - symbol: String, addresses: HashMap, } impl Token { - pub fn symbol(&self) -> String { - self.symbol.clone() - } - pub fn address(&self, chain: Chain) -> Option
{ self.addresses.get(&chain).cloned() } } -macro_rules! declare_token { - ( $token: ident, $( $chain_id: expr => $addr: expr ),* ) => { - pub fn $token() -> Token { - let mut addresses = HashMap::new(); - $( - addresses.insert( - Chain::from_str($chain_id).expect("invalid chain"), - Address::from_str($addr).expect("invalid address"), - ); - )* - - Token { - symbol: stringify!($token).to_string(), - addresses, - } - } - } +pub fn token>(symbol: S) -> Option { + TOKENS.get(&symbol.into()).cloned() } -declare_token!(dai, "mainnet" => "0x6b175474e89094c44da98b954eedeac495271d0f", "rinkeby" => "0x8ad3aa5d5ff084307d28c8f514d7a193b2bfe725"); -declare_token!(usdc, "mainnet" => "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"); - #[cfg(test)] mod tests { use super::*; #[test] - fn test_dai() { - let dai_token = dai(); - assert_eq!(dai_token.symbol(), "dai".to_string()); - assert_eq!( - dai_token.address(Chain::Mainnet), - Some(Address::from_str("0x6b175474e89094c44da98b954eedeac495271d0f").unwrap()) - ); - assert_eq!( - dai_token.address(Chain::Rinkeby), - Some(Address::from_str("0x8ad3aa5d5ff084307d28c8f514d7a193b2bfe725").unwrap()) - ); - assert_eq!(dai_token.address(Chain::Goerli), None); + fn test_tokens() { + assert!(token("dai").is_some()); + assert!(token("usdc").is_some()); + assert!(token("rand").is_none()); + } + + #[test] + fn test_addrs() { + assert!(token("dai").unwrap().address(Chain::Mainnet).is_some()); + assert!(token("dai").unwrap().address(Chain::MoonbeamDev).is_none()); } } diff --git a/ethers-tokenlist/tokens.json b/ethers-tokenlist/tokens.json new file mode 100644 index 000000000..76c4ce7b8 --- /dev/null +++ b/ethers-tokenlist/tokens.json @@ -0,0 +1,13 @@ +{ + "dai": { + "addresses": { + "mainnet": "0x6b175474e89094c44da98b954eedeac495271d0f", + "rinkeby": "0x8ad3aa5d5ff084307d28c8f514d7a193b2bfe725" + } + }, + "usdc": { + "addresses": { + "mainnet": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48" + } + } +} From b72243192db9b29cf645783479abcf1635fbf671 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 Jan 2022 16:20:09 +0800 Subject: [PATCH 3/7] chore: add tokenlist to prelude --- Cargo.lock | 1 + Cargo.toml | 1 + src/lib.rs | 7 +++++++ 3 files changed, 9 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index d1f15d2bf..e72f131ed 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1095,6 +1095,7 @@ dependencies = [ "ethers-providers", "ethers-signers", "ethers-solc", + "ethers-tokenlist", "hex", "rand 0.8.4", "serde", diff --git a/Cargo.toml b/Cargo.toml index 9d7254bdf..77cc6aab5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -89,6 +89,7 @@ ethers-signers = { version = "^0.6.0", default-features = false, path = "./ether ethers-middleware = { version = "^0.6.0", default-features = false, path = "./ethers-middleware" } ethers-solc = { version = "^0.1.0", default-features = false, path = "./ethers-solc" } ethers-etherscan = { version = "^0.2.0", default-features = false, path = "./ethers-etherscan" } +ethers-tokenlist = { version = "^0.1.0", default-features = false, path = "./ethers-tokenlist" } [dev-dependencies] ethers-contract = { version = "^0.6.0", default-features = false, path = "./ethers-contract", features = ["abigen", "eip712"] } diff --git a/src/lib.rs b/src/lib.rs index d5dc218dd..2a7dd9f05 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -119,6 +119,11 @@ pub mod etherscan { pub use ethers_etherscan::*; } +/// List of frequently used tokens for multiple chains +pub mod tokenlist { + pub use ethers_tokenlist::*; +} + pub use crate::core::{abi, types, utils}; /// Easy imports of frequently used type definitions and traits @@ -137,4 +142,6 @@ pub mod prelude { pub use super::solc::*; pub use super::etherscan::*; + + pub use super::tokenlist::*; } From b4b4ca7af75f6c3ba03a530e441e16b86352354e Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 Jan 2022 16:46:58 +0800 Subject: [PATCH 4/7] fix: from current dir --- ethers-tokenlist/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers-tokenlist/src/lib.rs b/ethers-tokenlist/src/lib.rs index 03382f130..62ac03698 100644 --- a/ethers-tokenlist/src/lib.rs +++ b/ethers-tokenlist/src/lib.rs @@ -5,7 +5,7 @@ use serde::Deserialize; use std::{collections::HashMap, fs::File, io::BufReader}; static TOKENS: Lazy> = Lazy::new(|| { - let f = File::open("tokens.json").unwrap(); + let f = File::open("./tokens.json").unwrap(); let r = BufReader::new(f); serde_json::from_reader(r).unwrap() }); From 35ba8bb25a8037c204a840662ead9e55a2463f71 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 Jan 2022 16:57:39 +0800 Subject: [PATCH 5/7] fix: dir refactoring --- ethers-tokenlist/src/lib.rs | 11 +++++------ ethers-tokenlist/{ => src/tokens}/tokens.json | 0 2 files changed, 5 insertions(+), 6 deletions(-) rename ethers-tokenlist/{ => src/tokens}/tokens.json (100%) diff --git a/ethers-tokenlist/src/lib.rs b/ethers-tokenlist/src/lib.rs index 62ac03698..2f799c21e 100644 --- a/ethers-tokenlist/src/lib.rs +++ b/ethers-tokenlist/src/lib.rs @@ -2,13 +2,12 @@ use ethers_core::types::{Address, Chain}; use once_cell::sync::Lazy; use serde::Deserialize; -use std::{collections::HashMap, fs::File, io::BufReader}; +use std::collections::HashMap; -static TOKENS: Lazy> = Lazy::new(|| { - let f = File::open("./tokens.json").unwrap(); - let r = BufReader::new(f); - serde_json::from_reader(r).unwrap() -}); +const TOKENS_JSON: &'static str = include_str!("./tokens/tokens.json"); + +static TOKENS: Lazy> = + Lazy::new(|| serde_json::from_str(TOKENS_JSON).unwrap()); #[derive(Clone, Debug, Deserialize)] pub struct Token { diff --git a/ethers-tokenlist/tokens.json b/ethers-tokenlist/src/tokens/tokens.json similarity index 100% rename from ethers-tokenlist/tokens.json rename to ethers-tokenlist/src/tokens/tokens.json From 70e0882019d91aaef5c40d388bc8b66c8e9b987d Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 Jan 2022 17:17:47 +0800 Subject: [PATCH 6/7] fix: clippy --- ethers-tokenlist/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers-tokenlist/src/lib.rs b/ethers-tokenlist/src/lib.rs index 2f799c21e..2446a0d54 100644 --- a/ethers-tokenlist/src/lib.rs +++ b/ethers-tokenlist/src/lib.rs @@ -4,7 +4,7 @@ use serde::Deserialize; use std::collections::HashMap; -const TOKENS_JSON: &'static str = include_str!("./tokens/tokens.json"); +const TOKENS_JSON: &str = include_str!("./tokens/tokens.json"); static TOKENS: Lazy> = Lazy::new(|| serde_json::from_str(TOKENS_JSON).unwrap()); From e2a47682f60dbf34c8f93c379598e70e2fe303d6 Mon Sep 17 00:00:00 2001 From: Rohit Narurkar Date: Fri, 7 Jan 2022 17:38:52 +0800 Subject: [PATCH 7/7] chore: refactor tokenlist to addressbook --- Cargo.lock | 22 +++++----- Cargo.toml | 6 +-- .../Cargo.toml | 2 +- .../src/contracts/contracts.json | 0 ethers-addressbook/src/lib.rs | 43 +++++++++++++++++++ ethers-tokenlist/src/lib.rs | 43 ------------------- src/lib.rs | 14 +++--- 7 files changed, 65 insertions(+), 65 deletions(-) rename {ethers-tokenlist => ethers-addressbook}/Cargo.toml (87%) rename ethers-tokenlist/src/tokens/tokens.json => ethers-addressbook/src/contracts/contracts.json (100%) create mode 100644 ethers-addressbook/src/lib.rs delete mode 100644 ethers-tokenlist/src/lib.rs diff --git a/Cargo.lock b/Cargo.lock index e72f131ed..fc5021bc2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1088,6 +1088,7 @@ version = "0.6.0" dependencies = [ "anyhow", "bytes", + "ethers-addressbook", "ethers-contract", "ethers-core", "ethers-etherscan", @@ -1095,7 +1096,6 @@ dependencies = [ "ethers-providers", "ethers-signers", "ethers-solc", - "ethers-tokenlist", "hex", "rand 0.8.4", "serde", @@ -1103,6 +1103,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "ethers-addressbook" +version = "0.1.0" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + [[package]] name = "ethers-contract" version = "0.6.0" @@ -1350,16 +1360,6 @@ dependencies = [ "walkdir", ] -[[package]] -name = "ethers-tokenlist" -version = "0.1.0" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - [[package]] name = "ethers-wasm" version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml index 77cc6aab5..0d16a9f3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,7 @@ Complete Ethereum library and wallet implementation in Rust. [workspace] members = [ + "ethers-addressbook", "ethers-contract", "ethers-providers", "ethers-signers", @@ -21,11 +22,11 @@ members = [ "ethers-middleware", "ethers-etherscan", "ethers-solc", - "ethers-tokenlist", "examples/ethers-wasm", ] default-members = [ + "ethers-addressbook", "ethers-contract", "ethers-providers", "ethers-signers", @@ -33,7 +34,6 @@ default-members = [ "ethers-middleware", "ethers-etherscan", "ethers-solc", - "ethers-tokenlist", ] [package.metadata.docs.rs] @@ -82,6 +82,7 @@ solc-tests = ["ethers-solc/tests"] solc-sha2-asm = ["ethers-solc/asm"] [dependencies] +ethers-addressbook = { version = "^0.1.0", default-features = false, path = "./ethers-addressbook" } ethers-contract = { version = "^0.6.0", default-features = false, path = "./ethers-contract" } ethers-core = { version = "^0.6.0", default-features = false, path = "./ethers-core" } ethers-providers = { version = "^0.6.0", default-features = false, path = "./ethers-providers" } @@ -89,7 +90,6 @@ ethers-signers = { version = "^0.6.0", default-features = false, path = "./ether ethers-middleware = { version = "^0.6.0", default-features = false, path = "./ethers-middleware" } ethers-solc = { version = "^0.1.0", default-features = false, path = "./ethers-solc" } ethers-etherscan = { version = "^0.2.0", default-features = false, path = "./ethers-etherscan" } -ethers-tokenlist = { version = "^0.1.0", default-features = false, path = "./ethers-tokenlist" } [dev-dependencies] ethers-contract = { version = "^0.6.0", default-features = false, path = "./ethers-contract", features = ["abigen", "eip712"] } diff --git a/ethers-tokenlist/Cargo.toml b/ethers-addressbook/Cargo.toml similarity index 87% rename from ethers-tokenlist/Cargo.toml rename to ethers-addressbook/Cargo.toml index 62bc06416..ead556e1e 100644 --- a/ethers-tokenlist/Cargo.toml +++ b/ethers-addressbook/Cargo.toml @@ -1,5 +1,5 @@ [package] -name = "ethers-tokenlist" +name = "ethers-addressbook" version = "0.1.0" edition = "2021" diff --git a/ethers-tokenlist/src/tokens/tokens.json b/ethers-addressbook/src/contracts/contracts.json similarity index 100% rename from ethers-tokenlist/src/tokens/tokens.json rename to ethers-addressbook/src/contracts/contracts.json diff --git a/ethers-addressbook/src/lib.rs b/ethers-addressbook/src/lib.rs new file mode 100644 index 000000000..3abe61dff --- /dev/null +++ b/ethers-addressbook/src/lib.rs @@ -0,0 +1,43 @@ +use ethers_core::types::{Address, Chain}; +use once_cell::sync::Lazy; +use serde::Deserialize; + +use std::collections::HashMap; + +const CONTRACTS_JSON: &str = include_str!("./contracts/contracts.json"); + +static ADDRESSBOOK: Lazy> = + Lazy::new(|| serde_json::from_str(CONTRACTS_JSON).unwrap()); + +#[derive(Clone, Debug, Deserialize)] +pub struct Contract { + addresses: HashMap, +} + +impl Contract { + pub fn address(&self, chain: Chain) -> Option
{ + self.addresses.get(&chain).cloned() + } +} + +pub fn contract>(name: S) -> Option { + ADDRESSBOOK.get(&name.into()).cloned() +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_tokens() { + assert!(contract("dai").is_some()); + assert!(contract("usdc").is_some()); + assert!(contract("rand").is_none()); + } + + #[test] + fn test_addrs() { + assert!(contract("dai").unwrap().address(Chain::Mainnet).is_some()); + assert!(contract("dai").unwrap().address(Chain::MoonbeamDev).is_none()); + } +} diff --git a/ethers-tokenlist/src/lib.rs b/ethers-tokenlist/src/lib.rs deleted file mode 100644 index 2446a0d54..000000000 --- a/ethers-tokenlist/src/lib.rs +++ /dev/null @@ -1,43 +0,0 @@ -use ethers_core::types::{Address, Chain}; -use once_cell::sync::Lazy; -use serde::Deserialize; - -use std::collections::HashMap; - -const TOKENS_JSON: &str = include_str!("./tokens/tokens.json"); - -static TOKENS: Lazy> = - Lazy::new(|| serde_json::from_str(TOKENS_JSON).unwrap()); - -#[derive(Clone, Debug, Deserialize)] -pub struct Token { - addresses: HashMap, -} - -impl Token { - pub fn address(&self, chain: Chain) -> Option
{ - self.addresses.get(&chain).cloned() - } -} - -pub fn token>(symbol: S) -> Option { - TOKENS.get(&symbol.into()).cloned() -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_tokens() { - assert!(token("dai").is_some()); - assert!(token("usdc").is_some()); - assert!(token("rand").is_none()); - } - - #[test] - fn test_addrs() { - assert!(token("dai").unwrap().address(Chain::Mainnet).is_some()); - assert!(token("dai").unwrap().address(Chain::MoonbeamDev).is_none()); - } -} diff --git a/src/lib.rs b/src/lib.rs index 2a7dd9f05..da32f5d30 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -84,6 +84,11 @@ //! [`abi`]: core::abi //! [`types`]: core::types +/// Address book consisting of frequently used contracts +pub mod addressbook { + pub use ethers_addressbook::*; +} + #[doc = include_str!("../assets/CONTRACT_README.md")] pub mod contract { pub use ethers_contract::*; @@ -119,16 +124,13 @@ pub mod etherscan { pub use ethers_etherscan::*; } -/// List of frequently used tokens for multiple chains -pub mod tokenlist { - pub use ethers_tokenlist::*; -} - pub use crate::core::{abi, types, utils}; /// Easy imports of frequently used type definitions and traits #[doc(hidden)] pub mod prelude { + pub use super::addressbook::*; + pub use super::contract::*; pub use super::core::{types::*, *}; @@ -142,6 +144,4 @@ pub mod prelude { pub use super::solc::*; pub use super::etherscan::*; - - pub use super::tokenlist::*; }