Struct near_contract_tools::standard::nep148::FungibleTokenMetadata
source · pub struct FungibleTokenMetadata {
pub spec: String,
pub name: String,
pub symbol: String,
pub icon: Option<String>,
pub reference: Option<String>,
pub reference_hash: Option<Base64VecU8>,
pub decimals: u8,
}
Expand description
NEP-148-compatible metadata struct
Fields§
§spec: String
Version of the NEP-148 spec
name: String
Human-friendly name of the token contract
symbol: String
Short, ideally unique string to concisely identify the token contract
icon: Option<String>
String representation (HTTP URL, data URL, IPFS, Arweave, etc.) of an icon for this token
reference: Option<String>
External (off-chain) URL to additional JSON metadata for this token contract
reference_hash: Option<Base64VecU8>
Hash of the content that should be present in the reference
field.
For tamper protection.
decimals: u8
Cosmetic. Number of base-10 decimal places to shift the floating point. 18 is a common value.
Trait Implementations§
source§impl BorshDeserialize for FungibleTokenMetadatawhere
String: BorshDeserialize,
Option<String>: BorshDeserialize,
Option<Base64VecU8>: BorshDeserialize,
u8: BorshDeserialize,
impl BorshDeserialize for FungibleTokenMetadatawhere
String: BorshDeserialize,
Option<String>: BorshDeserialize,
Option<Base64VecU8>: BorshDeserialize,
u8: BorshDeserialize,
source§impl BorshSerialize for FungibleTokenMetadatawhere
String: BorshSerialize,
Option<String>: BorshSerialize,
Option<Base64VecU8>: BorshSerialize,
u8: BorshSerialize,
impl BorshSerialize for FungibleTokenMetadatawhere
String: BorshSerialize,
Option<String>: BorshSerialize,
Option<Base64VecU8>: BorshSerialize,
u8: BorshSerialize,
source§impl Clone for FungibleTokenMetadata
impl Clone for FungibleTokenMetadata
source§fn clone(&self) -> FungibleTokenMetadata
fn clone(&self) -> FungibleTokenMetadata
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for FungibleTokenMetadata
impl Debug for FungibleTokenMetadata
source§impl<'de> Deserialize<'de> for FungibleTokenMetadata
impl<'de> Deserialize<'de> for FungibleTokenMetadata
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