7 releases (breaking)

new 0.7.0 Mar 4, 2025
0.6.0 Sep 24, 2021
0.5.0 Sep 13, 2021
0.4.0 Sep 2, 2021
0.1.0 Jul 6, 2021

#585 in Magic Beans

Download history 5/week @ 2024-12-05 7/week @ 2024-12-12 1/week @ 2025-01-23 13/week @ 2025-01-30 1/week @ 2025-02-13 101/week @ 2025-02-27

102 downloads per month

MIT license

22KB
323 lines

token-list

Latest Version Docs CI

Ethereum token list standard created by Uniswap

usage

Cargo.toml:

token-list = { version = "0.1.0", features = ["from-uri"] }
tokio = { version = "1", features = ["full"] }

main.rs:

use token_list::TokenList;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let token_list = TokenList::from_uri("https://defi.cmc.eth.link").await?;

    assert_eq!(token_list.name, "CMC DeFi");

    Ok(())
}

You don't need the tokio dependency if you do not wish to enable the from_uri method.

Dependencies

~3–17MB
~231K SLoC