Skip to content

Commit 073633b

Browse files
committed
Make it work
1 parent 28cfb58 commit 073633b

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cw-storage-plus = { version = "2.0.0" }
3333
cw-utils = { version = "2.0.0" }
3434

3535
# cw-multi-test = { package = "abstract-cw-multi-test", version = "2.0.2", features = ["cosmwasm_1_2"] }
36-
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"] }
36+
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"] }
3737
cw20 = { version = "2.0.0" }
3838
cw20-base = { version = "2.0.0" }
3939

packages/cw-orch-mock/src/bech32.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use std::{cell::RefCell, rc::Rc};
22

33
use cosmwasm_std::{testing::MockApi, Addr, Coin, Uint128};
4-
use cw_multi_test::{AppBuilder, MockApiBech32};
4+
use cw_multi_test::{AppBuilder, MockApiBech32, TokenFactoryStargate};
55
use cw_orch_core::{
66
environment::{BankQuerier, BankSetter, DefaultQueriers, StateInterface, TxHandler},
77
CwEnvError,
@@ -74,6 +74,7 @@ impl<S: StateInterface> MockBase<MockApiBech32, S> {
7474
let app = Rc::new(RefCell::new(
7575
AppBuilder::new_custom()
7676
.with_api(MockApiBech32::new(prefix))
77+
.with_stargate(TokenFactoryStargate)
7778
.build(|_, _, _| {}),
7879
));
7980

packages/cw-orch-mock/src/core.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use cosmwasm_std::{
66
};
77
use cw_multi_test::{
88
ibc::IbcSimpleModule, App, AppResponse, BankKeeper, Contract, DistributionKeeper, Executor,
9-
FailingModule, GovFailingModule, MockApiBech32, StakeKeeper, StargateFailing, WasmKeeper,
9+
FailingModule, GovFailingModule, MockApiBech32, StakeKeeper, StargateFailing,
10+
TokenFactoryStargate, WasmKeeper,
1011
};
1112
use serde::Serialize;
1213

@@ -27,7 +28,7 @@ pub type MockApp<A = MockApi> = App<
2728
DistributionKeeper,
2829
IbcSimpleModule,
2930
GovFailingModule,
30-
StargateFailing,
31+
TokenFactoryStargate,
3132
>;
3233

3334
/// Wrapper around a cw-multi-test [`App`](cw_multi_test::App) backend.

packages/cw-orch-mock/src/simple.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use std::rc::Rc;
33

44
use cosmwasm_std::testing::MockApi;
55
use cosmwasm_std::{Addr, Coin, Uint128};
6-
use cw_multi_test::AppBuilder;
6+
use cw_multi_test::{AppBuilder, TokenFactoryStargate};
77
use cw_orch_core::environment::{BankQuerier, BankSetter, TxHandler};
88
use cw_orch_core::{
99
environment::{DefaultQueriers, StateInterface},
@@ -105,7 +105,9 @@ impl<S: StateInterface> Mock<S> {
105105
/// The state is customizable by implementing the `StateInterface` trait on a custom struct and providing it on the custom constructor.
106106
pub fn new_custom(sender: impl Into<String>, custom_state: S) -> Self {
107107
let state = Rc::new(RefCell::new(custom_state));
108-
let app = AppBuilder::new_custom().build(|_, _, _| {});
108+
let app = AppBuilder::new_custom()
109+
.with_stargate(TokenFactoryStargate)
110+
.build(|_, _, _| {});
109111
let sender: String = sender.into();
110112
let sender = app.api().addr_make(&sender);
111113
let app = Rc::new(RefCell::new(app));

0 commit comments

Comments
 (0)