1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2024 IOTA Stiftung
// SPDX-License-Identifier: Apache-2.0

use std::fmt::Display;

use move_core_types::language_storage::TypeTag;

use crate::gas_coin::GAS;

/// The type tag for the outputs used in the migration.
#[derive(Copy, Clone, Debug, PartialEq, Eq)]
pub enum CoinType {
    Iota,
}

impl CoinType {
    pub fn to_type_tag(&self) -> TypeTag {
        match self {
            Self::Iota => GAS::type_tag(),
        }
    }
}

impl Display for CoinType {
    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
        match self {
            Self::Iota => write!(f, "iota"),
        }
    }
}