diff --git a/Cargo.toml b/Cargo.toml index 806c0312..474d8d99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ cw-storage-plus = { version = "2.0.0" } cw-utils = { version = "2.0.0" } # cw-multi-test = { package = "abstract-cw-multi-test", version = "2.0.2", features = ["cosmwasm_1_2"] } -cw-multi-test = { package = "abstract-cw-multi-test", git = "https://github.com/abstractsdk/cw-multi-test-fork", branch = "token-factory-integration", version = "2.0.2", features = ["cosmwasm_1_2"] } +cw-multi-test = { package = "abstract-cw-multi-test", git = "https://github.com/abstractsdk/cw-multi-test-fork", branch = "token-factory-integration", version = "2.0.2", features = ["cosmwasm_1_2", "tokenfactory"] } cw20 = { version = "2.0.0" } cw20-base = { version = "2.0.0" } diff --git a/packages/cw-orch-mock/src/bech32.rs b/packages/cw-orch-mock/src/bech32.rs index 4759ea0e..48f9708f 100644 --- a/packages/cw-orch-mock/src/bech32.rs +++ b/packages/cw-orch-mock/src/bech32.rs @@ -1,7 +1,7 @@ use std::{cell::RefCell, rc::Rc}; use cosmwasm_std::{testing::MockApi, Addr, Coin, Uint128}; -use cw_multi_test::{AppBuilder, MockApiBech32}; +use cw_multi_test::{AppBuilder, MockApiBech32, TokenFactoryStargate}; use cw_orch_core::{ environment::{BankQuerier, BankSetter, DefaultQueriers, StateInterface, TxHandler}, CwEnvError, @@ -74,6 +74,7 @@ impl MockBase { let app = Rc::new(RefCell::new( AppBuilder::new_custom() .with_api(MockApiBech32::new(prefix)) + .with_stargate(TokenFactoryStargate) .build(|_, _, _| {}), )); diff --git a/packages/cw-orch-mock/src/core.rs b/packages/cw-orch-mock/src/core.rs index 9345de53..28c45696 100644 --- a/packages/cw-orch-mock/src/core.rs +++ b/packages/cw-orch-mock/src/core.rs @@ -6,7 +6,8 @@ use cosmwasm_std::{ }; use cw_multi_test::{ ibc::IbcSimpleModule, App, AppResponse, BankKeeper, Contract, DistributionKeeper, Executor, - FailingModule, GovFailingModule, MockApiBech32, StakeKeeper, StargateFailing, WasmKeeper, + FailingModule, GovFailingModule, MockApiBech32, StakeKeeper, StargateFailing, + TokenFactoryStargate, WasmKeeper, }; use serde::Serialize; @@ -27,7 +28,7 @@ pub type MockApp = App< DistributionKeeper, IbcSimpleModule, GovFailingModule, - StargateFailing, + TokenFactoryStargate, >; /// Wrapper around a cw-multi-test [`App`](cw_multi_test::App) backend. diff --git a/packages/cw-orch-mock/src/simple.rs b/packages/cw-orch-mock/src/simple.rs index fc51f513..ad883811 100644 --- a/packages/cw-orch-mock/src/simple.rs +++ b/packages/cw-orch-mock/src/simple.rs @@ -3,7 +3,7 @@ use std::rc::Rc; use cosmwasm_std::testing::MockApi; use cosmwasm_std::{Addr, Coin, Uint128}; -use cw_multi_test::AppBuilder; +use cw_multi_test::{AppBuilder, TokenFactoryStargate}; use cw_orch_core::environment::{BankQuerier, BankSetter, TxHandler}; use cw_orch_core::{ environment::{DefaultQueriers, StateInterface}, @@ -105,7 +105,9 @@ impl Mock { /// The state is customizable by implementing the `StateInterface` trait on a custom struct and providing it on the custom constructor. pub fn new_custom(sender: impl Into, custom_state: S) -> Self { let state = Rc::new(RefCell::new(custom_state)); - let app = AppBuilder::new_custom().build(|_, _, _| {}); + let app = AppBuilder::new_custom() + .with_stargate(TokenFactoryStargate) + .build(|_, _, _| {}); let sender: String = sender.into(); let sender = app.api().addr_make(&sender); let app = Rc::new(RefCell::new(app));