Struct token_list::Token [−][src]
pub struct Token {
pub name: String,
pub symbol: String,
pub address: String,
pub chain_id: u32,
pub decimals: u16,
pub logo_uri: Option<Url>,
pub tags: Vec<String>,
pub extensions: HashMap<String, Option<ExtensionValue>>,
}Expand description
Metadata for a single token in a token list
Fields
name: StringThe name of the token
symbol: StringThe symbol for the token; must be alphanumeric.
address: StringThe checksummed address of the token on the specified chain ID
chain_id: u32The chain ID of the Ethereum network where this token is deployed
decimals: u16The number of decimals for the token balance
logo_uri: Option<Url>A URI to the token logo asset; if not set, interface will attempt to find a logo based on the token address; suggest SVG or PNG of size 64x64
An array of tag identifiers associated with the token; tags are defined at the list level
extensions: HashMap<String, Option<ExtensionValue>>An object containing any arbitrary or vendor-specific token metadata
Implementations
Gets the value of polygonAddress if present (and a String) in the
extensions map.
Trait Implementations
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for Token
impl UnwindSafe for Token
Blanket Implementations
Mutably borrows from an owned value. Read more