token-list

Crates.iotoken-list
lib.rstoken-list
version0.6.0
sourcesrc
created_at2021-07-06 22:36:44.182523
updated_at2021-09-24 18:57:36.921895
descriptionEthereum token list standard
homepage
repositoryhttps://github.com/telcoin/token-list.git
max_upload_size
id419721
size23,622
William Myers (mwilliammyers)

documentation

README

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.

Commit count: 28

cargo fmt