Skip to content

Commit

Permalink
chore: update crowdfund integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
joemonem committed May 9, 2024
1 parent 6e3fba7 commit 161f4ba
Show file tree
Hide file tree
Showing 2 changed files with 254 additions and 244 deletions.
15 changes: 15 additions & 0 deletions contracts/non-fungible-tokens/andromeda-crowdfund/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use andromeda_non_fungible_tokens::{
cw721::TokenExtension,
};
use andromeda_std::{
ado_base::rates::{Rate, RatesMessage},
amp::{AndrAddr, Recipient},
common::expiration::Expiry,
};
Expand Down Expand Up @@ -119,6 +120,16 @@ impl MockCrowdfund {
let msg = mock_purchase_msg(number_of_tokens);
self.execute(app, &msg, sender, funds)
}

pub fn execute_add_rate(
&self,
app: &mut MockApp,
sender: Addr,
action: String,
rate: Rate,
) -> ExecuteResult {
self.execute(app, &mock_set_rate_msg(action, rate), sender, &[])
}
}

pub fn mock_andromeda_crowdfund() -> Box<dyn Contract<Empty>> {
Expand Down Expand Up @@ -194,6 +205,10 @@ pub fn mock_purchase_msg(number_of_tokens: Option<u32>) -> ExecuteMsg {
ExecuteMsg::Purchase { number_of_tokens }
}

pub fn mock_set_rate_msg(action: String, rate: Rate) -> ExecuteMsg {
ExecuteMsg::Rates(RatesMessage::SetRate { action, rate })
}

pub fn mock_query_ado_base_version() -> QueryMsg {
QueryMsg::ADOBaseVersion {}
}
Expand Down
Loading

0 comments on commit 161f4ba

Please sign in to comment.