Crate token_list

Source
Expand description

Ethereum token list standard

§Examples

use token_list::TokenList;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // requires enabling the `from-uri` feature
    let token_list = TokenList::from_uri("https://defi.cmc.eth.link").await?;
     
    assert_eq!(token_list.name, "CMC DeFi");
     
    Ok(())
}

Structs§

Tag
Definition of a tag that can be associated with a token via its identifier
Token
Metadata for a single token in a token list
TokenList
A list of Ethereum token metadata conforming to the token list schema.

Enums§

ExtensionValue
The value for a user-defined extension.
Number
A number