Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
iboss-ptk committed Oct 21, 2024
1 parent ed4800a commit 83bec7b
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 50 deletions.
24 changes: 12 additions & 12 deletions packages/osmosis-test-tube/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,32 +4,32 @@ edition = "2021"
license = "MIT OR Apache-2.0"
name = "osmosis-test-tube"
repository = "https://github.com/osmosis-labs/test-tube"
version = "25.0.0"
version = "26.0.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

exclude = ["osmosis", "test_artifacts"]

[dependencies]
base64 = "0.21.5"
cosmrs = { version = "0.15.0", features = ["cosmwasm"] }
cosmwasm-std = "1.5.5"
osmosis-std = "0.25.0"
prost = "0.12.3"
base64 = "0.22.1"
cosmrs = {version = "0.20.0", features = ["cosmwasm"]}
cosmwasm-std = "2.1"
osmosis-std = "0.26.0"
prost = "0.13.3"
serde = "1.0.144"
serde_json = "1.0.85"
test-tube = { version = "0.7.0", path = "../test-tube", features = [
"module-wrappers",
] }
test-tube = {version = "0.8.0", path = "../test-tube", features = [
"module-wrappers",
]}
thiserror = "1.0.34"

[features]
default = []
wasm-sudo = ["test-tube/wasm-sudo"]

[build-dependencies]
bindgen = "0.69.1"
bindgen = "0.70.1"

[dev-dependencies]
cw1-whitelist = "1.1.1"
cw1-whitelist = "2.0.0"
rayon = "1.5.3"
simple-sudo = { path = "../../test_contracts/simple-sudo" }
simple-sudo = {path = "../../test_contracts/simple-sudo"}
2 changes: 0 additions & 2 deletions packages/osmosis-test-tube/build.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
extern crate core;

use std::{env, path::PathBuf, process::Command};

fn main() {
Expand Down
16 changes: 10 additions & 6 deletions packages/osmosis-test-tube/src/module/concentrated_liquidity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,12 +149,16 @@ mod tests {
title: "Create concentrated uosmo:usdc pool".to_string(),
description: "Create concentrated uosmo:usdc pool, so that we can trade it"
.to_string(),
pool_records: vec![PoolRecord {
denom0: denom0.clone(),
denom1: "uosmo".to_string(),
tick_spacing: 1,
spread_factor: "0".to_string(),
}],
pool_records: vec![
#[allow(deprecated)]
PoolRecord {
denom0: denom0.clone(),
denom1: "uosmo".to_string(),
tick_spacing: 1,
spread_factor: "0".to_string(),
exponent_at_price_one: "0".to_string(), // DEPRECATED
},
],
},
signer.address(),
&signer,
Expand Down
17 changes: 11 additions & 6 deletions packages/osmosis-test-tube/src/module/pool_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,16 @@ mod tests {
title: "Create concentrated uosmo:usdc pool".to_string(),
description: "Create concentrated uosmo:usdc pool, so that we can trade it"
.to_string(),
pool_records: vec![PoolRecord {
denom0: denom0.clone(),
denom1: "uosmo".to_string(),
tick_spacing: 100,
spread_factor: "0".to_string(),
}],
pool_records: vec![
#[allow(deprecated)]
PoolRecord {
denom0: denom0.clone(),
denom1: "uosmo".to_string(),
tick_spacing: 100,
spread_factor: "0".to_string(),
exponent_at_price_one: "0".to_string(), // DEPRECATED
},
],
},
signer.address(),
&signer,
Expand Down Expand Up @@ -293,6 +297,7 @@ mod tests {
token_out_denom: "uosmo".to_string(),
}],
token_in: format!("{}{}", "1000000", denom0),
sender: trader.address(),
})
.unwrap();
let expected_token_out = res.token_out_amount;
Expand Down
17 changes: 11 additions & 6 deletions packages/osmosis-test-tube/src/runner/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,13 +169,17 @@ impl OsmosisTestApp {
where
I: IntoIterator<Item = cosmrs::Any>,
{
let ext = TxExtension {
selected_authenticators: selected_authenticators.to_vec(),
}
.to_any();
let ext_ops = vec![cosmrs::Any {
type_url: ext.type_url,
value: ext.value,
}];
let tx_body = tx::Body {
messages: msgs.into_iter().map(Into::into).collect(),
non_critical_extension_options: vec![TxExtension {
selected_authenticators: selected_authenticators.to_vec(),
}
.to_any()
.into()],
non_critical_extension_options: ext_ops,
..Default::default()
};

Expand Down Expand Up @@ -534,6 +538,7 @@ mod tests {
.query_all_balances(&QueryAllBalancesRequest {
address: bob.address(),
pagination: None,
resolve_denom: false,
})
.unwrap()
.balances
Expand Down Expand Up @@ -577,7 +582,7 @@ mod tests {

app.set_param_set(
"lockup",
osmosis_std::shim::Any {
cosmrs::Any {
type_url: lockup::Params::TYPE_URL.to_string(),
value: in_pset.encode_to_vec(),
},
Expand Down
15 changes: 8 additions & 7 deletions packages/test-tube/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@ edition = "2021"
license = "MIT OR Apache-2.0"
name = "test-tube"
repository = "https://github.com/osmosis-labs/test-tube"
version = "0.7.0"
version = "0.8.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
base64 = "0.21.5"
cosmrs = { version = "0.15.0", features = ["cosmwasm", "rpc"] }
cosmwasm-std = { version = "1.5.5", features = ["stargate"] }
osmosis-std = { version = "0.25.0", optional = true }
prost = "0.12.3"
base64 = "0.22.1"
cosmrs = {version = "0.20.0", features = ["cosmwasm", "rpc"]}
cosmwasm-std = {version = "2.1", features = ["stargate"]}
osmosis-std = {version = "0.26.0", optional = true}
prost = "0.13.3"
serde = "1.0.144"
serde_json = "1.0.85"
thiserror = "1.0.34"

[dev-dependencies]
cw1-whitelist = "1.1.2"
cw1-whitelist = "2.0.0"
rayon = "1.5.3"

[features]
cosmwasm_2_0 = ["cosmwasm-std/cosmwasm_2_0"]
default = []
module-wrappers = ["bank", "wasm"]
wasm-sudo = []
Expand Down
7 changes: 7 additions & 0 deletions packages/test-tube/src/runner/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,17 @@ pub trait Runner<'a> {
.iter()
.map(|msg| match msg {
CosmosMsg::Bank(msg) => bank_msg_to_any(msg, signer),

#[allow(deprecated)]
CosmosMsg::Stargate { type_url, value } => Ok(cosmrs::Any {
type_url: type_url.clone(),
value: value.to_vec(),
}),
#[cfg(feature = "cosmwasm_2_0")]
CosmosMsg::Any(msg) => Ok(cosmrs::Any {
type_url: msg.type_url.clone(),
value: msg.value.to_vec(),
}),
CosmosMsg::Wasm(msg) => wasm_msg_to_any(msg, signer),
_ => todo!("unsupported cosmos msg variant"),
})
Expand Down
8 changes: 4 additions & 4 deletions packages/test-tube/src/runner/result.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ where
.into_iter()
.map(|a| -> Result<Attribute, Utf8Error> {
Ok(Attribute {
key: std::str::from_utf8(a.key.as_ref())?.to_string(),
value: std::str::from_utf8(a.value.as_ref())?.to_string(),
key: std::str::from_utf8(a.key_bytes())?.to_string(),
value: std::str::from_utf8(a.value_bytes())?.to_string(),
})
})
.collect::<Result<Vec<Attribute>, Utf8Error>>()?,
Expand Down Expand Up @@ -103,8 +103,8 @@ where
.into_iter()
.map(|a| -> Result<Attribute, Utf8Error> {
Ok(Attribute {
key: a.key.to_string(),
value: a.value.to_string(),
key: std::str::from_utf8(a.key_bytes())?.to_string(),
value: std::str::from_utf8(a.value_bytes())?.to_string(),
})
})
.collect::<Result<Vec<Attribute>, Utf8Error>>()?,
Expand Down
12 changes: 5 additions & 7 deletions test_contracts/simple-sudo/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ panic = 'abort'
rpath = false

[features]
# for more explicit tests, cargo test --features=backtraces
backtraces = ["cosmwasm-std/backtraces"]
# use library feature to disable all instantiate/execute/query exports
library = []

Expand All @@ -34,13 +32,13 @@ optimize = """docker run --rm -v "$(pwd)":/code \
"""

[dependencies]
cosmwasm-schema = "1.5.0"
cosmwasm-std = {version = "1.5.0"}
cw-storage-plus = "1.1.0"
cw2 = "1.1.1"
cosmwasm-schema = "2.0.0"
cosmwasm-std = {version = "2.0.0"}
cw-storage-plus = "2.0.0"
cw2 = "2.0.0"
schemars = "0.8.15"
serde = {version = "1.0.189", default-features = false, features = ["derive"]}
thiserror = {version = "1.0.49"}

[dev-dependencies]
cw-multi-test = "0.17.0"
cw-multi-test = "2.0.0"

0 comments on commit 83bec7b

Please sign in to comment.