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§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Token
impl<'de> Deserialize<'de> for Token
Source§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
impl StructuralPartialEq for Token
Auto Trait Implementations§
impl Freeze for Token
impl RefUnwindSafe for Token
impl Send for Token
impl Sync for Token
impl Unpin for Token
impl UnwindSafe for Token
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more