iota_types/stardust/
coin_type.rs1use std::fmt::Display;
5
6use move_core_types::language_storage::TypeTag;
7
8use crate::gas_coin::GAS;
9
10#[derive(Copy, Clone, Debug, PartialEq, Eq)]
12pub enum CoinType {
13 Iota,
14}
15
16impl CoinType {
17 pub fn to_type_tag(&self) -> TypeTag {
18 match self {
19 Self::Iota => GAS::type_tag(),
20 }
21 }
22}
23
24impl Display for CoinType {
25 fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
26 match self {
27 Self::Iota => write!(f, "iota"),
28 }
29 }
30}