Skip to content
6 changes: 3 additions & 3 deletions contracts/stargaze-marketplace-v2/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ pub enum ContractError {
#[error("{0}")]
MarketplaceStdError(#[from] MarketplaceStdError),

#[error("No match found")]
#[error("NoMatchFound")]
NoMatchFound,

#[error("InvalidInput: {0}")]
InvalidInput(String),

#[error("InsufficientFunds")]
InsufficientFunds,
#[error("InsufficientFunds: {0}")]
InsufficientFunds(String),

#[error("InternalError: {0}")]
InternalError(String),
Expand Down
17 changes: 17 additions & 0 deletions contracts/stargaze-marketplace-v2/src/events.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,23 @@ impl<'a> From<ListingFeeEvent<'a>> for Event {
}
}

pub struct MinExpiryRewardEvent<'a> {
pub ty: &'a str,
pub denom: &'a str,
pub amount: &'a Option<Uint128>,
}

impl<'a> From<MinExpiryRewardEvent<'a>> for Event {
fn from(mre: MinExpiryRewardEvent) -> Self {
let mut event = Event::new(mre.ty.to_string());
event = event.add_attribute("denom", mre.denom.to_string());
if let Some(amount) = mre.amount {
event = event.add_attribute("reward", amount.to_string());
}
event
}
}

pub struct AskEvent<'a> {
pub ty: &'a str,
pub ask: &'a Ask,
Expand Down
Loading