iota_types/stardust/
coin_type.rs

1// Copyright (c) 2024 IOTA Stiftung
2// SPDX-License-Identifier: Apache-2.0
3
4use std::fmt::Display;
5
6use move_core_types::language_storage::TypeTag;
7
8use crate::gas_coin::GAS;
9
10/// The type tag for the outputs used in the migration.
11#[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}