diff --git a/contracts/interchain-token-service/src/token_metadata.rs b/contracts/interchain-token-service/src/token_metadata.rs index 7fe2527a..dd82a12d 100644 --- a/contracts/interchain-token-service/src/token_metadata.rs +++ b/contracts/interchain-token-service/src/token_metadata.rs @@ -1,6 +1,7 @@ use soroban_sdk::{token, Address, Env, String}; use soroban_token_sdk::metadata::TokenMetadata; use stellar_axelar_std::ensure; +use stellar_axelar_std::token::validate_token_metadata; use crate::error::ContractError; diff --git a/contracts/interchain-token-service/tests/deploy_interchain_token.rs b/contracts/interchain-token-service/tests/deploy_interchain_token.rs index ada93b36..f6201398 100644 --- a/contracts/interchain-token-service/tests/deploy_interchain_token.rs +++ b/contracts/interchain-token-service/tests/deploy_interchain_token.rs @@ -199,6 +199,8 @@ fn deploy_interchain_token_fails_with_invalid_token_metadata() { let sender = Address::generate(&env); let minter: Option
= None; let salt = BytesN::<32>::from_array(&env, &[1; 32]); + let invalid_decimals = (u8::MAX) as u32 + 1; + let token_metadata = TokenMetadata::new(&env, "Test", "TEST", invalid_decimals); let initial_supply = 0; let cases = [