Skip to content

Commit

Permalink
fix(interchain-token-service): remove token manager type (#688)
Browse files Browse the repository at this point in the history
  • Loading branch information
milapsheth authored Nov 12, 2024
1 parent 421b1ea commit ada9e92
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 23 deletions.
10 changes: 1 addition & 9 deletions contracts/interchain-token-service/src/abi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use error_stack::{bail, ensure, report, Report, ResultExt};
use router_api::ChainNameRaw;

use crate::primitives::{HubMessage, Message};
use crate::{primitives, TokenId, TokenManagerType};
use crate::{primitives, TokenId};

// ITS Message payload types
// Reference: https://github.com/axelarnetwork/interchain-token-service/blob/v1.2.4/DESIGN.md#interchain-communication-spec
Expand Down Expand Up @@ -62,8 +62,6 @@ pub enum Error {
InvalidMessageType,
#[error("invalid chain name")]
InvalidChainName,
#[error("invalid token manager type")]
InvalidTokenManagerType,
#[error(transparent)]
NonEmpty(#[from] nonempty::Error),
#[error(transparent)]
Expand Down Expand Up @@ -219,12 +217,6 @@ impl From<MessageType> for U256 {
}
}

impl From<TokenManagerType> for U256 {
fn from(value: TokenManagerType) -> Self {
U256::from(value as u8)
}
}

fn into_vec(value: Option<nonempty::HexBinary>) -> std::vec::Vec<u8> {
value.map(|v| v.into()).unwrap_or_default()
}
Expand Down
14 changes: 0 additions & 14 deletions contracts/interchain-token-service/src/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ use axelar_wasm_std::nonempty;
use cosmwasm_schema::cw_serde;
use cw_storage_plus::{Key, KeyDeserialize, Prefixer, PrimaryKey};
use router_api::ChainNameRaw;
use strum::FromRepr;

/// A unique 32-byte identifier for linked cross-chain tokens across ITS contracts.
#[cw_serde]
Expand All @@ -21,19 +20,6 @@ impl Display for TokenId {
}
}

/// The supported types of token managers that can be deployed by ITS contracts.
#[cw_serde]
#[derive(Eq, Copy, FromRepr, strum::AsRefStr)]
#[repr(u8)]
pub enum TokenManagerType {
NativeInterchainToken,
MintBurnFrom,
LockUnlock,
LockUnlockFee,
MintBurn,
Gateway,
}

/// A message sent between ITS contracts to facilitate interchain transfers, token deployments, or token manager deployments.
/// `Message` routed via the ITS hub get wrapped inside a [`HubMessage`]
#[cw_serde]
Expand Down

0 comments on commit ada9e92

Please sign in to comment.