diff --git a/contracts/minters/minter/src/contract.rs b/contracts/minters/minter/src/contract.rs index 15e8bc9..b6997da 100644 --- a/contracts/minters/minter/src/contract.rs +++ b/contracts/minters/minter/src/contract.rs @@ -87,8 +87,12 @@ pub fn instantiate( // Exact amount must be paid if amount != creation_fee_amount { return Err(ContractError::InvalidCreationFee { - expected: amount, - sent: amount, + expected: [Coin { + denom: creation_fee_denom, + amount: creation_fee_amount, + }] + .to_vec(), + sent: info.funds, }); } // Check if per address limit is 0 diff --git a/contracts/minters/minter/src/error.rs b/contracts/minters/minter/src/error.rs index 4a96c3b..dd80ec8 100644 --- a/contracts/minters/minter/src/error.rs +++ b/contracts/minters/minter/src/error.rs @@ -1,6 +1,8 @@ use std::convert::Infallible; -use cosmwasm_std::{CheckedFromRatioError, ConversionOverflowError, StdError, Timestamp, Uint128}; +use cosmwasm_std::{ + CheckedFromRatioError, Coin, ConversionOverflowError, StdError, Timestamp, Uint128, +}; use cw_utils::PaymentError; use pauser::PauseError; use thiserror::Error; @@ -26,7 +28,10 @@ pub enum ContractError { DivideByZero {}, #[error("Invalid creation fee")] - InvalidCreationFee { expected: Uint128, sent: Uint128 }, + InvalidCreationFee { + expected: Vec, + sent: Vec, + }, #[error("Minting has not started yet")] MintingNotStarted { diff --git a/contracts/minters/multi-mint-oem/src/contract.rs b/contracts/minters/multi-mint-oem/src/contract.rs index d98c2a1..fd52a67 100644 --- a/contracts/minters/multi-mint-oem/src/contract.rs +++ b/contracts/minters/multi-mint-oem/src/contract.rs @@ -79,12 +79,16 @@ pub fn instantiate( CREATION_FEE_DENOM.to_string() }; - let amount = must_pay(&info, &creation_fee_denom)?; + let amount = must_pay(&info.clone(), &creation_fee_denom)?; // Exact amount must be paid if amount != creation_fee_amount { return Err(ContractError::InvalidCreationFee { - expected: amount, - sent: amount, + expected: [Coin { + denom: creation_fee_denom, + amount: creation_fee_amount, + }] + .to_vec(), + sent: info.funds.clone(), }); } // Check if per address limit is 0 diff --git a/contracts/minters/multi-mint-oem/src/error.rs b/contracts/minters/multi-mint-oem/src/error.rs index faaf3f4..b13cf55 100644 --- a/contracts/minters/multi-mint-oem/src/error.rs +++ b/contracts/minters/multi-mint-oem/src/error.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{StdError, Timestamp, Uint128}; +use cosmwasm_std::{Coin, StdError, Timestamp, Uint128}; use cw_utils::PaymentError; use pauser::PauseError; use thiserror::Error; @@ -24,7 +24,10 @@ pub enum ContractError { DivideByZero {}, #[error("Invalid creation fee")] - InvalidCreationFee { expected: Uint128, sent: Uint128 }, + InvalidCreationFee { + expected: Vec, + sent: Vec, + }, #[error("Minting has not started yet")] MintingNotStarted { diff --git a/contracts/minters/open-edition-minter/src/contract.rs b/contracts/minters/open-edition-minter/src/contract.rs index 98cc6fa..9865e0e 100644 --- a/contracts/minters/open-edition-minter/src/contract.rs +++ b/contracts/minters/open-edition-minter/src/contract.rs @@ -81,8 +81,12 @@ pub fn instantiate( // Exact amount must be paid if amount != creation_fee_amount { return Err(ContractError::InvalidCreationFee { - expected: amount, - sent: amount, + expected: [Coin { + denom: creation_fee_denom, + amount: creation_fee_amount, + }] + .to_vec(), + sent: info.funds, }); } // Check if per address limit is 0 diff --git a/contracts/minters/open-edition-minter/src/error.rs b/contracts/minters/open-edition-minter/src/error.rs index faaf3f4..b13cf55 100644 --- a/contracts/minters/open-edition-minter/src/error.rs +++ b/contracts/minters/open-edition-minter/src/error.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{StdError, Timestamp, Uint128}; +use cosmwasm_std::{Coin, StdError, Timestamp, Uint128}; use cw_utils::PaymentError; use pauser::PauseError; use thiserror::Error; @@ -24,7 +24,10 @@ pub enum ContractError { DivideByZero {}, #[error("Invalid creation fee")] - InvalidCreationFee { expected: Uint128, sent: Uint128 }, + InvalidCreationFee { + expected: Vec, + sent: Vec, + }, #[error("Minting has not started yet")] MintingNotStarted {