Skip to content

Commit 1ca0371

Browse files
seanchen1991rnbguy
andauthored
Update CosmWasm dependencies to v2 (#1251)
* Update cosmwasm dependencies * Update cosmwasm deps versions * Remove unnecessary lifetime * Remove call to deprecated `mock_info` function * Format cargo.toml file * update cw in cw-check * update cargo lockfiles * cw v1.5 compatiblity is fixed in v2.0.4 * need std feature --------- Co-authored-by: Ranadeep Biswas <[email protected]>
1 parent ea662dc commit 1ca0371

File tree

5 files changed

+29
-36
lines changed

5 files changed

+29
-36
lines changed

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ members = [
3939
# internal crates that are not published
4040
"tests-integration",
4141
]
42+
4243
exclude = [
4344
"ci/cw-check",
4445
"ci/no-std-check",
@@ -105,8 +106,7 @@ ibc-client-tendermint-types = { version = "0.53.0", path = "./ibc-clients/ics07-
105106
ibc-client-wasm-types = { version = "0.53.0", path = "./ibc-clients/ics08-wasm/types", default-features = false }
106107
ibc-app-transfer-types = { version = "0.53.0", path = "./ibc-apps/ics20-transfer/types", default-features = false }
107108
ibc-app-nft-transfer-types = { version = "0.53.0", path = "./ibc-apps/ics721-nft-transfer/types", default-features = false }
108-
109-
ibc-proto = { version = "0.45.0", default-features = false }
109+
ibc-proto = { version = "0.45.0", default-features = false }
110110

111111
# cosmos dependencies
112112
tendermint = { version = "0.36.0", default-features = false }
@@ -120,10 +120,10 @@ tendermint-testgen = { version = "0.36.0", default-features = fals
120120
### Note: Kept at the following version to match the CosmWasm module version
121121
### used by chains supporting the wasm-enabled version of ibc-go v7.3
122122
### (This is the min version of `ibc-go` that supports `08-wasm` light clients)
123-
cosmwasm-schema = { version = "1.5.4" }
124-
cosmwasm-std = { version = "1.5.4" }
125-
cosmwasm-vm = { version = "1.5.4" }
126-
cw-storage-plus = { version = "1.2.0" }
123+
cosmwasm-schema = { version = "2.0.4" }
124+
cosmwasm-std = { version = "2.0.4" }
125+
cosmwasm-vm = { version = "2.0.4" }
126+
cw-storage-plus = { version = "2.0.0" }
127127

128128
# parity dependencies
129129
parity-scale-codec = { version = "3.6.5", default-features = false, features = [ "derive" ] }

ci/cw-check/Cargo.lock

Lines changed: 15 additions & 25 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ci/cw-check/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ crate-type = [ "cdylib", "rlib" ]
99
[dependencies]
1010
ibc-apps = { path = "../../ibc-apps", default-features = false, features = [ "serde", "parity-scale-codec" ] }
1111
ibc-core = { path = "../../ibc-core", features = [ "serde", "parity-scale-codec", "schema" ] }
12-
cosmwasm-std = { version = "1.5.4", default-features = false }
13-
cosmwasm-schema = { version = "1.5.4", default-features = false }
12+
cosmwasm-std = { version = "2.0.4", default-features = false, features = [ "std" ] }
13+
cosmwasm-schema = { version = "2.0.4", default-features = false }
1414
serde-json = { package = "serde-json-wasm", version = "^1.0.1", default-features = false }
1515
thiserror = { version = "^1.0", default-features = false }
1616

ibc-clients/cw-context/src/context/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type Checksum = Vec<u8>;
2828
/// - Only a sorted set is needed. So the value type is set to
2929
/// [`Empty`] following
3030
/// ([cosmwasm-book](https://book.cosmwasm.com/cross-contract/map-storage.html#maps-as-sets)).
31-
pub const CONSENSUS_STATE_HEIGHT_MAP: Map<'_, (u64, u64), Empty> =
31+
pub const CONSENSUS_STATE_HEIGHT_MAP: Map<(u64, u64), Empty> =
3232
Map::new(ITERATE_CONSENSUS_STATE_PREFIX);
3333

3434
/// Context is a wrapper around the deps and env that provides access

tests-integration/tests/cosmwasm/helper.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
use std::str::FromStr;
22

3-
use cosmwasm_std::testing::{mock_env, mock_info};
3+
use cosmwasm_std::testing::{message_info, mock_dependencies, mock_env};
44
use cosmwasm_std::{coins, Env, MessageInfo, Timestamp as CwTimestamp};
55
use ibc::clients::tendermint::types::ConsensusState;
66
use ibc::core::primitives::Timestamp as IbcTimestamp;
77
use tendermint::Hash;
88

99
pub fn dummy_msg_info() -> MessageInfo {
10-
mock_info("creator", &coins(1000, "ibc"))
10+
let deps = mock_dependencies();
11+
let creator = deps.api.addr_make("creator");
12+
13+
message_info(&creator, &coins(1000, "ibc"))
1114
}
1215

1316
pub fn dummy_checksum() -> Vec<u8> {

0 commit comments

Comments
 (0)