| 16 | #[storable] |
| 17 | #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord)] |
| 18 | pub struct Asset { |
| 19 | pub id: AssetId, |
| 20 | /// The blockchain identifier (e.g., `ethereum`, `bitcoin`, `icp`, etc.) |
| 21 | pub blockchain: Blockchain, |
| 22 | // The asset standard that is supported (e.g. `erc20`, `icp_native`, etc.), canonically |
| 23 | // represented as a lowercase string with spaces replaced with underscores. |
| 24 | pub standards: BTreeSet<TokenStandard>, |
| 25 | /// The asset symbol (e.g. `ICP`, `BTC`, `ETH`, etc.) |
| 26 | pub symbol: String, |
| 27 | /// The asset name (e.g. `Internet Computer`, `Bitcoin`, `Ethereum`, etc.) |
| 28 | pub name: String, |
| 29 | /// The number of decimal places that the asset supports (e.g. `8` for `BTC`, `18` for `ETH`, etc.) |
| 30 | pub decimals: u32, |
| 31 | /// The asset metadata (e.g. `{"logo": "https://example.com/logo.png"}`). |
| 32 | pub metadata: Metadata, |
| 33 | } |
| 34 | |
| 35 | impl Asset { |
| 36 | pub const DECIMALS_RANGE: (u32, u32) = (0, 18); |
no outgoing calls
no test coverage detected