From 88d6bffa542ffe7872f664f5d693b21a0890e406 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Mon, 7 Mar 2022 17:04:01 +0100 Subject: [PATCH 1/2] Upgrade cosmwasm to 1.0.0-beta6 --- Cargo.lock | 27 ++++++++++++++++--------- contracts/cw1-subkeys/Cargo.toml | 4 ++-- contracts/cw1-whitelist-ng/Cargo.toml | 4 ++-- contracts/cw1-whitelist/Cargo.toml | 4 ++-- contracts/cw1155-base/Cargo.toml | 4 ++-- contracts/cw20-base/Cargo.toml | 4 ++-- contracts/cw20-ics20/Cargo.toml | 4 ++-- contracts/cw3-fixed-multisig/Cargo.toml | 4 ++-- contracts/cw3-flex-multisig/Cargo.toml | 4 ++-- contracts/cw4-group/Cargo.toml | 4 ++-- contracts/cw4-stake/Cargo.toml | 4 ++-- packages/controllers/Cargo.toml | 2 +- packages/cw1/Cargo.toml | 4 ++-- packages/cw1155/Cargo.toml | 4 ++-- packages/cw2/Cargo.toml | 2 +- packages/cw20/Cargo.toml | 4 ++-- packages/cw3/Cargo.toml | 4 ++-- packages/cw4/Cargo.toml | 4 ++-- packages/multi-test/Cargo.toml | 4 ++-- packages/storage-plus/Cargo.toml | 2 +- packages/utils/Cargo.toml | 2 +- 21 files changed, 53 insertions(+), 46 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b8c4ce5e5..14813c3bf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -155,9 +155,9 @@ checksum = "9d6f2aa4d0537bcc1c74df8755072bd31c1ef1a3a1b85a68e8404a8c353b7b8b" [[package]] name = "cosmwasm-crypto" -version = "1.0.0-beta5" +version = "1.0.0-beta6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8904127a5b9e325ef5d6b2b3f997dcd74943cd35097139b1a4d15b1b6bccae66" +checksum = "2dddc1443004c6340e55ca66d98e9d2f1a44aadf4ce2bed2c4f29baa8a15e7b7" dependencies = [ "digest", "ed25519-zebra", @@ -168,18 +168,18 @@ dependencies = [ [[package]] name = "cosmwasm-derive" -version = "1.0.0-beta5" +version = "1.0.0-beta6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a14364ac4d9d085867929d0cf3e94b1d2100121ce02c33c72961406830002613" +checksum = "fe4f0f10f165b8bcc558a13cddb498140960544519aa0581532c766dd80b5598" dependencies = [ "syn", ] [[package]] name = "cosmwasm-schema" -version = "1.0.0-beta5" +version = "1.0.0-beta6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2941b87c42620d348e96ed05876bfda0dc1d5454a646d780d32f114c04921d" +checksum = "497432aa9a8e154e3789845f64049d088eb797ba5a7f78da312153f46c822388" dependencies = [ "schemars", "serde_json", @@ -187,13 +187,14 @@ dependencies = [ [[package]] name = "cosmwasm-std" -version = "1.0.0-beta5" +version = "1.0.0-beta6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2ece12e5bbde434b93937d7b2107e6291f11d69ffa72398c50e8bab41d451d3" +checksum = "2f0f3145097b692b2d95fa5d2c7c6fdd60f193ccc709857e7e1987a608725300" dependencies = [ "base64", "cosmwasm-crypto", "cosmwasm-derive", + "forward_ref", "schemars", "serde", "serde-json-wasm", @@ -203,9 +204,9 @@ dependencies = [ [[package]] name = "cosmwasm-storage" -version = "1.0.0-beta5" +version = "1.0.0-beta6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e4338d8e9934effa4594f139ce4e5f4b426796b70e2d53bb7e8605e9adf68c" +checksum = "2945b2c28f64a09e1831f8f830641dc86b39b374c211215e88f2252f474dcb6e" dependencies = [ "cosmwasm-std", "serde", @@ -744,6 +745,12 @@ dependencies = [ "subtle", ] +[[package]] +name = "forward_ref" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8cbd1169bd7b4a0a20d92b9af7a7e0422888bd38a6f5ec29c1fd8c1558a272e" + [[package]] name = "generic-array" version = "0.14.5" diff --git a/contracts/cw1-subkeys/Cargo.toml b/contracts/cw1-subkeys/Cargo.toml index db313da0a..8ebebea6d 100644 --- a/contracts/cw1-subkeys/Cargo.toml +++ b/contracts/cw1-subkeys/Cargo.toml @@ -23,7 +23,7 @@ cw-utils = { path = "../../packages/utils", version = "0.12.1" } cw1 = { path = "../../packages/cw1", version = "0.12.1" } cw2 = { path = "../../packages/cw2", version = "0.12.1" } cw1-whitelist = { path = "../cw1-whitelist", version = "0.12.1", features = ["library"] } -cosmwasm-std = { version = "1.0.0-beta5", features = ["staking"] } +cosmwasm-std = { version = "1.0.0-beta6", features = ["staking"] } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } @@ -31,5 +31,5 @@ thiserror = "1.0.23" semver = "1" [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } cw1-whitelist = { path = "../cw1-whitelist", version = "0.12.1", features = ["library", "test-utils"] } diff --git a/contracts/cw1-whitelist-ng/Cargo.toml b/contracts/cw1-whitelist-ng/Cargo.toml index 89e20e1e9..04732dc59 100644 --- a/contracts/cw1-whitelist-ng/Cargo.toml +++ b/contracts/cw1-whitelist-ng/Cargo.toml @@ -25,7 +25,7 @@ multitest = ["cw-multi-test", "anyhow"] cw-utils = { path = "../../packages/utils", version = "0.12.1" } cw1 = { path = "../../packages/cw1", version = "0.12.1" } cw2 = { path = "../../packages/cw2", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5", features = ["staking"] } +cosmwasm-std = { version = "1.0.0-beta6", features = ["staking"] } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } @@ -36,6 +36,6 @@ anyhow = { version = "1", optional = true } [dev-dependencies] anyhow = "1" assert_matches = "1" -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } cw-multi-test = { path = "../../packages/multi-test", version = "0.12.1" } derivative = "2" diff --git a/contracts/cw1-whitelist/Cargo.toml b/contracts/cw1-whitelist/Cargo.toml index ac7e9ed28..05995e64b 100644 --- a/contracts/cw1-whitelist/Cargo.toml +++ b/contracts/cw1-whitelist/Cargo.toml @@ -22,7 +22,7 @@ test-utils = [] cw-utils = { path = "../../packages/utils", version = "0.12.1" } cw1 = { path = "../../packages/cw1", version = "0.12.1" } cw2 = { path = "../../packages/cw2", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5", features = ["staking"] } +cosmwasm-std = { version = "1.0.0-beta6", features = ["staking"] } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } @@ -31,6 +31,6 @@ thiserror = { version = "1.0.23" } [dev-dependencies] anyhow = "1" assert_matches = "1" -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } cw-multi-test = { path = "../../packages/multi-test", version = "0.12.1" } derivative = "2" diff --git a/contracts/cw1155-base/Cargo.toml b/contracts/cw1155-base/Cargo.toml index e6197e527..834ac65b2 100644 --- a/contracts/cw1155-base/Cargo.toml +++ b/contracts/cw1155-base/Cargo.toml @@ -22,10 +22,10 @@ cw-utils = { path = "../../packages/utils", version = "0.12.1" } cw2 = { path = "../../packages/cw2", version = "0.12.1" } cw1155 = { path = "../../packages/cw1155", version = "0.12.1" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.20" } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/contracts/cw20-base/Cargo.toml b/contracts/cw20-base/Cargo.toml index 03acef104..061e093be 100644 --- a/contracts/cw20-base/Cargo.toml +++ b/contracts/cw20-base/Cargo.toml @@ -22,10 +22,10 @@ cw-utils = { path = "../../packages/utils", version = "0.12.1" } cw2 = { path = "../../packages/cw2", version = "0.12.1" } cw20 = { path = "../../packages/cw20", version = "0.12.1" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.23" } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/contracts/cw20-ics20/Cargo.toml b/contracts/cw20-ics20/Cargo.toml index 2b10d4857..d36fa5d2a 100644 --- a/contracts/cw20-ics20/Cargo.toml +++ b/contracts/cw20-ics20/Cargo.toml @@ -21,7 +21,7 @@ library = [] cw-utils = { path = "../../packages/utils", version = "0.12.1" } cw2 = { path = "../../packages/cw2", version = "0.12.1" } cw20 = { path = "../../packages/cw20", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5", features = ["stargate"] } +cosmwasm-std = { version = "1.0.0-beta6", features = ["stargate"] } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } cw-controllers = { path = "../../packages/controllers", version = "0.12.1" } schemars = "0.8.1" @@ -30,4 +30,4 @@ serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.23" } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/contracts/cw3-fixed-multisig/Cargo.toml b/contracts/cw3-fixed-multisig/Cargo.toml index b1388a00b..089861193 100644 --- a/contracts/cw3-fixed-multisig/Cargo.toml +++ b/contracts/cw3-fixed-multisig/Cargo.toml @@ -22,13 +22,13 @@ cw-utils = { path = "../../packages/utils", version = "0.12.1" } cw2 = { path = "../../packages/cw2", version = "0.12.1" } cw3 = { path = "../../packages/cw3", version = "0.12.1" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.23" } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } cw20 = { path = "../../packages/cw20", version = "0.12.1" } cw20-base = { path = "../cw20-base", version = "0.12.1", features = ["library"] } cw-multi-test = { path = "../../packages/multi-test", version = "0.12.1" } diff --git a/contracts/cw3-flex-multisig/Cargo.toml b/contracts/cw3-flex-multisig/Cargo.toml index e4f032420..e397f673a 100644 --- a/contracts/cw3-flex-multisig/Cargo.toml +++ b/contracts/cw3-flex-multisig/Cargo.toml @@ -24,12 +24,12 @@ cw3 = { path = "../../packages/cw3", version = "0.12.1" } cw3-fixed-multisig = { path = "../cw3-fixed-multisig", version = "0.12.1", features = ["library"] } cw4 = { path = "../../packages/cw4", version = "0.12.1" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.23" } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } cw4-group = { path = "../cw4-group", version = "0.12.1" } cw-multi-test = { path = "../../packages/multi-test", version = "0.12.1" } diff --git a/contracts/cw4-group/Cargo.toml b/contracts/cw4-group/Cargo.toml index b2038f155..842cede30 100644 --- a/contracts/cw4-group/Cargo.toml +++ b/contracts/cw4-group/Cargo.toml @@ -31,10 +31,10 @@ cw2 = { path = "../../packages/cw2", version = "0.12.1" } cw4 = { path = "../../packages/cw4", version = "0.12.1" } cw-controllers = { path = "../../packages/controllers", version = "0.12.1" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.23" } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/contracts/cw4-stake/Cargo.toml b/contracts/cw4-stake/Cargo.toml index a3086f48c..7ed93addc 100644 --- a/contracts/cw4-stake/Cargo.toml +++ b/contracts/cw4-stake/Cargo.toml @@ -32,10 +32,10 @@ cw4 = { path = "../../packages/cw4", version = "0.12.1" } cw20 = { path = "../../packages/cw20", version = "0.12.1" } cw-controllers = { path = "../../packages/controllers", version = "0.12.1" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.23" } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/packages/controllers/Cargo.toml b/packages/controllers/Cargo.toml index 17ee89281..4739bb0e9 100644 --- a/packages/controllers/Cargo.toml +++ b/packages/controllers/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.cosmwasm.com" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } cw-utils = { path = "../utils", version = "0.12.1" } cw-storage-plus = { path = "../storage-plus", version = "0.12.1" } schemars = "0.8.1" diff --git a/packages/cw1/Cargo.toml b/packages/cw1/Cargo.toml index 8b3017c2d..6cac3d9fd 100644 --- a/packages/cw1/Cargo.toml +++ b/packages/cw1/Cargo.toml @@ -10,9 +10,9 @@ homepage = "https://cosmwasm.com" documentation = "https://docs.cosmwasm.com" [dependencies] -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/packages/cw1155/Cargo.toml b/packages/cw1155/Cargo.toml index e81f36c92..8ae9a6204 100644 --- a/packages/cw1155/Cargo.toml +++ b/packages/cw1155/Cargo.toml @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com" [dependencies] cw-utils = { path = "../../packages/utils", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/packages/cw2/Cargo.toml b/packages/cw2/Cargo.toml index 675d2ecfe..b23fc717d 100644 --- a/packages/cw2/Cargo.toml +++ b/packages/cw2/Cargo.toml @@ -10,7 +10,7 @@ homepage = "https://cosmwasm.com" documentation = "https://docs.cosmwasm.com" [dependencies] -cosmwasm-std = { version = "1.0.0-beta5", default-features = false } +cosmwasm-std = { version = "1.0.0-beta6", default-features = false } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/packages/cw20/Cargo.toml b/packages/cw20/Cargo.toml index c24708e85..3d027f622 100644 --- a/packages/cw20/Cargo.toml +++ b/packages/cw20/Cargo.toml @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com" [dependencies] cw-utils = { path = "../../packages/utils", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/packages/cw3/Cargo.toml b/packages/cw3/Cargo.toml index 98dcc64af..a643a0f76 100644 --- a/packages/cw3/Cargo.toml +++ b/packages/cw3/Cargo.toml @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com" [dependencies] cw-utils = { path = "../../packages/utils", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/packages/cw4/Cargo.toml b/packages/cw4/Cargo.toml index 77c20b649..f61dd94f8 100644 --- a/packages/cw4/Cargo.toml +++ b/packages/cw4/Cargo.toml @@ -11,9 +11,9 @@ documentation = "https://docs.cosmwasm.com" [dependencies] cw-storage-plus = { path = "../storage-plus", version = "0.12.1" } -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } [dev-dependencies] -cosmwasm-schema = { version = "1.0.0-beta5" } +cosmwasm-schema = { version = "1.0.0-beta6" } diff --git a/packages/multi-test/Cargo.toml b/packages/multi-test/Cargo.toml index f39042c1d..3da22ef5a 100644 --- a/packages/multi-test/Cargo.toml +++ b/packages/multi-test/Cargo.toml @@ -20,8 +20,8 @@ backtrace = ["anyhow/backtrace"] [dependencies] cw-utils = { path = "../../packages/utils", version = "0.12.1" } cw-storage-plus = { path = "../../packages/storage-plus", version = "0.12.1"} -cosmwasm-std = { version = "1.0.0-beta5", features = ["staking"] } -cosmwasm-storage = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6", features = ["staking"] } +cosmwasm-storage = { version = "1.0.0-beta6" } itertools = "0.10.1" schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/packages/storage-plus/Cargo.toml b/packages/storage-plus/Cargo.toml index 1e22dd983..1d8d3f0cc 100644 --- a/packages/storage-plus/Cargo.toml +++ b/packages/storage-plus/Cargo.toml @@ -18,7 +18,7 @@ iterator = ["cosmwasm-std/iterator"] bench = false [dependencies] -cosmwasm-std = { version = "1.0.0-beta5", default-features = false } +cosmwasm-std = { version = "1.0.0-beta6", default-features = false } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } diff --git a/packages/utils/Cargo.toml b/packages/utils/Cargo.toml index f2ab10026..82ad9e35a 100644 --- a/packages/utils/Cargo.toml +++ b/packages/utils/Cargo.toml @@ -12,7 +12,7 @@ documentation = "https://docs.cosmwasm.com" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -cosmwasm-std = { version = "1.0.0-beta5" } +cosmwasm-std = { version = "1.0.0-beta6" } schemars = "0.8.1" serde = { version = "1.0.103", default-features = false, features = ["derive"] } thiserror = { version = "1.0.21" } From 45a2776b46ca604b03fd5139b64cca6fa8c7d9c3 Mon Sep 17 00:00:00 2001 From: Simon Warta Date: Tue, 1 Mar 2022 11:06:01 +0100 Subject: [PATCH 2/2] Adapt code to ContractResult -> SubMsgResult change --- contracts/cw20-ics20/src/ibc.rs | 16 ++++++++-------- .../src/test_helpers/contracts/echo.rs | 6 +++--- packages/multi-test/src/wasm.rs | 10 +++++----- packages/utils/src/parse_reply.rs | 6 +++--- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/contracts/cw20-ics20/src/ibc.rs b/contracts/cw20-ics20/src/ibc.rs index f666db322..add61ac5f 100644 --- a/contracts/cw20-ics20/src/ibc.rs +++ b/contracts/cw20-ics20/src/ibc.rs @@ -2,10 +2,10 @@ use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use cosmwasm_std::{ - attr, entry_point, from_binary, to_binary, BankMsg, Binary, ContractResult, CosmosMsg, Deps, - DepsMut, Env, IbcBasicResponse, IbcChannel, IbcChannelCloseMsg, IbcChannelConnectMsg, - IbcChannelOpenMsg, IbcEndpoint, IbcOrder, IbcPacket, IbcPacketAckMsg, IbcPacketReceiveMsg, - IbcPacketTimeoutMsg, IbcReceiveResponse, Reply, Response, SubMsg, Uint128, WasmMsg, + attr, entry_point, from_binary, to_binary, BankMsg, Binary, CosmosMsg, Deps, DepsMut, Env, + IbcBasicResponse, IbcChannel, IbcChannelCloseMsg, IbcChannelConnectMsg, IbcChannelOpenMsg, + IbcEndpoint, IbcOrder, IbcPacket, IbcPacketAckMsg, IbcPacketReceiveMsg, IbcPacketTimeoutMsg, + IbcReceiveResponse, Reply, Response, SubMsg, SubMsgResult, Uint128, WasmMsg, }; use crate::amount::Amount; @@ -87,8 +87,8 @@ const ACK_FAILURE_ID: u64 = 0xfa17; pub fn reply(deps: DepsMut, _env: Env, reply: Reply) -> Result { match reply.id { RECEIVE_ID => match reply.result { - ContractResult::Ok(_) => Ok(Response::new()), - ContractResult::Err(err) => { + SubMsgResult::Ok(_) => Ok(Response::new()), + SubMsgResult::Err(err) => { // Important design note: with ibcv2 and wasmd 0.22 we can implement this all much easier. // No reply needed... the receive function and submessage should return error on failure and all // state gets reverted with a proper app-level message auto-generated @@ -113,8 +113,8 @@ pub fn reply(deps: DepsMut, _env: Env, reply: Reply) -> Result match reply.result { - ContractResult::Ok(_) => Ok(Response::new()), - ContractResult::Err(err) => Ok(Response::new().set_data(ack_fail(err))), + SubMsgResult::Ok(_) => Ok(Response::new()), + SubMsgResult::Err(err) => Ok(Response::new().set_data(ack_fail(err))), }, _ => Err(ContractError::UnknownReplyId { id: reply.id }), } diff --git a/packages/multi-test/src/test_helpers/contracts/echo.rs b/packages/multi-test/src/test_helpers/contracts/echo.rs index 71737d530..c1d51b3a5 100644 --- a/packages/multi-test/src/test_helpers/contracts/echo.rs +++ b/packages/multi-test/src/test_helpers/contracts/echo.rs @@ -4,8 +4,8 @@ //! Additionally it bypass all events and attributes send to it use cosmwasm_std::{ - to_binary, Attribute, Binary, ContractResult, Deps, DepsMut, Empty, Env, Event, MessageInfo, - Reply, Response, StdError, SubMsg, SubMsgExecutionResponse, + to_binary, Attribute, Binary, Deps, DepsMut, Empty, Env, Event, MessageInfo, Reply, Response, + StdError, SubMsg, SubMsgExecutionResponse, SubMsgResult, }; use serde::{de::DeserializeOwned, Deserialize, Serialize}; @@ -98,7 +98,7 @@ where if let Reply { id, result: - ContractResult::Ok(SubMsgExecutionResponse { + SubMsgResult::Ok(SubMsgExecutionResponse { data: Some(data), .. }), } = msg diff --git a/packages/multi-test/src/wasm.rs b/packages/multi-test/src/wasm.rs index ce793c3af..513535230 100644 --- a/packages/multi-test/src/wasm.rs +++ b/packages/multi-test/src/wasm.rs @@ -4,9 +4,9 @@ use std::ops::Deref; use cosmwasm_std::{ to_binary, Addr, Api, Attribute, BankMsg, Binary, BlockInfo, Coin, ContractInfo, - ContractInfoResponse, ContractResult, CustomQuery, Deps, DepsMut, Env, Event, MessageInfo, - Order, Querier, QuerierWrapper, Reply, ReplyOn, Response, StdResult, Storage, SubMsg, - SubMsgExecutionResponse, TransactionInfo, WasmMsg, WasmQuery, + ContractInfoResponse, CustomQuery, Deps, DepsMut, Env, Event, MessageInfo, Order, Querier, + QuerierWrapper, Reply, ReplyOn, Response, StdResult, Storage, SubMsg, SubMsgExecutionResponse, + SubMsgResult, TransactionInfo, WasmMsg, WasmQuery, }; use cosmwasm_storage::{prefixed, prefixed_read, PrefixedStorage, ReadonlyPrefixedStorage}; use prost::Message; @@ -436,7 +436,7 @@ where if matches!(reply_on, ReplyOn::Always | ReplyOn::Success) { let reply = Reply { id, - result: ContractResult::Ok(SubMsgExecutionResponse { + result: SubMsgResult::Ok(SubMsgExecutionResponse { events: r.events.clone(), data: r.data, }), @@ -457,7 +457,7 @@ where if matches!(reply_on, ReplyOn::Always | ReplyOn::Error) { let reply = Reply { id, - result: ContractResult::Err(e.to_string()), + result: SubMsgResult::Err(e.to_string()), }; self._reply(api, router, storage, block, contract, reply) } else { diff --git a/packages/utils/src/parse_reply.rs b/packages/utils/src/parse_reply.rs index 37e1a27ca..3b61f7474 100644 --- a/packages/utils/src/parse_reply.rs +++ b/packages/utils/src/parse_reply.rs @@ -168,7 +168,7 @@ pub enum ParseReplyError { mod test { use super::*; use crate::parse_reply::ParseReplyError::{BrokenUtf8, ParseFailure}; - use cosmwasm_std::{ContractResult, SubMsgExecutionResponse}; + use cosmwasm_std::{SubMsgExecutionResponse, SubMsgResult}; use prost::Message; use std::str::from_utf8; @@ -466,7 +466,7 @@ mod test { // Build reply message let msg = Reply { id: 1, - result: ContractResult::Ok(SubMsgExecutionResponse { + result: SubMsgResult::Ok(SubMsgExecutionResponse { events: vec![], data: Some(encoded_instantiate_reply.into()), }), @@ -514,7 +514,7 @@ mod test { // Build reply message let msg = Reply { id: 1, - result: ContractResult::Ok(SubMsgExecutionResponse { + result: SubMsgResult::Ok(SubMsgExecutionResponse { events: vec![], data: Some(encoded_execute_reply.into()), }),