From 745f17db2693a4a4d321817327aa220b1ad5d651 Mon Sep 17 00:00:00 2001 From: Supanat Potiwarakorn Date: Thu, 7 Sep 2023 16:46:38 +0700 Subject: [PATCH] test-tube 0.1.7 --- packages/test-tube/Cargo.toml | 14 +++++++++++--- packages/test-tube/src/module/bank.rs | 2 ++ packages/test-tube/src/module/mod.rs | 3 +++ packages/test-tube/src/module/wasm.rs | 2 ++ 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/packages/test-tube/Cargo.toml b/packages/test-tube/Cargo.toml index 8d6a080c..773a4ab0 100644 --- a/packages/test-tube/Cargo.toml +++ b/packages/test-tube/Cargo.toml @@ -4,15 +4,15 @@ edition = "2021" license = "MIT OR Apache-2.0" name = "test-tube" repository = "https://github.com/osmosis-labs/test-tube" -version = "0.1.6" +version = "0.1.7" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] base64 = "0.13.0" cosmrs = {version = "0.9.0", features = ["cosmwasm", "rpc"]} -cosmwasm-std = {version = "1.1.2", features = ["stargate"]} -osmosis-std = "0.17.0-rc0" +cosmwasm-std = {version = "1.4.0", features = ["stargate"]} +osmosis-std = {version = "0.19.1", optional = true} prost = "0.11.0" serde = "1.0.144" serde_json = "1.0.85" @@ -21,3 +21,11 @@ thiserror = "1.0.34" [dev-dependencies] cw1-whitelist = "0.15.0" rayon = "1.5.3" + +[features] +default = [] + +module-wrappers = ["bank", "wasm"] + +bank = ["osmosis-std"] +wasm = ["osmosis-std"] diff --git a/packages/test-tube/src/module/bank.rs b/packages/test-tube/src/module/bank.rs index 7d08069a..cb1554d7 100644 --- a/packages/test-tube/src/module/bank.rs +++ b/packages/test-tube/src/module/bank.rs @@ -1,3 +1,5 @@ +#![cfg(feature = "bank")] + use crate::{fn_execute, fn_query}; use osmosis_std::types::cosmos::bank::v1beta1::{ MsgSend, MsgSendResponse, QueryAllBalancesRequest, QueryAllBalancesResponse, diff --git a/packages/test-tube/src/module/mod.rs b/packages/test-tube/src/module/mod.rs index 08b5e4ab..a8592ea9 100644 --- a/packages/test-tube/src/module/mod.rs +++ b/packages/test-tube/src/module/mod.rs @@ -3,7 +3,10 @@ use crate::runner::Runner; pub mod bank; pub mod wasm; +#[cfg(feature = "bank")] pub use bank::Bank; + +#[cfg(feature = "wasm")] pub use wasm::Wasm; #[macro_use] diff --git a/packages/test-tube/src/module/wasm.rs b/packages/test-tube/src/module/wasm.rs index f12f3c45..e78fd908 100644 --- a/packages/test-tube/src/module/wasm.rs +++ b/packages/test-tube/src/module/wasm.rs @@ -1,3 +1,5 @@ +#![cfg(feature = "wasm")] + use cosmwasm_std::Coin; use osmosis_std::types::cosmwasm::wasm::v1::{ AccessConfig, MsgExecuteContract, MsgExecuteContractResponse, MsgInstantiateContract,