From 785120010bb5638286515b40ebfcf866f37b11d7 Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Mon, 16 Dec 2024 09:50:44 -0600 Subject: [PATCH 01/11] chore(union-ibc): update cosmwasm-std to 2.1.4 --- Cargo.lock | 8 ++++---- cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml | 4 ++-- cosmwasm/union-ibc/core/Cargo.toml | 4 ++-- cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml | 2 +- cosmwasm/union-ibc/light-clients/linea/Cargo.toml | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 34281ea5a7..d1952257b9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13000,8 +13000,8 @@ version = "1.0.0" dependencies = [ "alloy", "cosmwasm-schema 1.5.8", - "cosmwasm-std 1.5.8", - "cw-storage-plus 1.2.0", + "cosmwasm-std 2.1.4", + "cw-storage-plus 2.0.0", "ethabi", "hex", "ibc-solidity", @@ -13047,8 +13047,8 @@ name = "union-ibc-ucs00-pingpong" version = "1.0.0" dependencies = [ "cosmwasm-schema 1.5.8", - "cosmwasm-std 1.5.8", - "cw-storage-plus 1.2.0", + "cosmwasm-std 2.1.4", + "cw-storage-plus 2.0.0", "ethabi", "hex", "serde", diff --git a/cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml b/cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml index 062144261e..1850d97927 100644 --- a/cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml +++ b/cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml @@ -17,8 +17,8 @@ library = [] [dependencies] cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["stargate"] } -cw-storage-plus = { workspace = true } +cosmwasm-std = { version = "2.1.4", features = ["stargate"] } +cw-storage-plus = { version = "2.0.0" } ethabi = { workspace = true } serde = { workspace = true, features = ["derive"] } thiserror = { workspace = true } diff --git a/cosmwasm/union-ibc/core/Cargo.toml b/cosmwasm/union-ibc/core/Cargo.toml index 54510384c3..37ead0b62a 100644 --- a/cosmwasm/union-ibc/core/Cargo.toml +++ b/cosmwasm/union-ibc/core/Cargo.toml @@ -18,8 +18,8 @@ library = [] [dependencies] alloy = { workspace = true, features = ["sol-types"] } cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["abort"] } -cw-storage-plus = { workspace = true } +cosmwasm-std = { version = "2.1.4", features = ["abort"] } +cw-storage-plus = { version = "2.0.0" } ethabi = { workspace = true } hex = { workspace = true } ibc-solidity = { workspace = true, features = ["serde"] } diff --git a/cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml b/cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml index 2c2809eda0..8253099f40 100644 --- a/cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml @@ -14,7 +14,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] cometbls-light-client-types = { workspace = true, features = ["proto"] } -cosmwasm-std = { workspace = true, features = ["abort"] } +cosmwasm-std = { version = "2.1.4", features = ["abort"] } # ethereum-light-client = { workspace = true, features = ["mainnet", "library"] } ics008-wasm-client = { workspace = true } ics23 = { workspace = true } diff --git a/cosmwasm/union-ibc/light-clients/linea/Cargo.toml b/cosmwasm/union-ibc/light-clients/linea/Cargo.toml index 578f5a31e7..69992f77ef 100644 --- a/cosmwasm/union-ibc/light-clients/linea/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/linea/Cargo.toml @@ -13,7 +13,7 @@ workspace = true crate-type = ["cdylib", "rlib"] [dependencies] -cosmwasm-std = { workspace = true, features = ["abort"] } +cosmwasm-std = { version = "2.1.4", features = ["abort"] } ethereum-light-client = { workspace = true, features = ["mainnet", "library"] } evm-storage-verifier = { workspace = true } gnark-mimc = { workspace = true } From 310bd7c208b305d480592b1398d7b1ae6e548172 Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:41:08 -0600 Subject: [PATCH 02/11] chore: update workspace to cosmwasm-std v2.1.5 --- Cargo.toml | 6 +++--- cosmwasm/token-factory-api/Cargo.toml | 4 ++-- cosmwasm/ucs01-relay-api/Cargo.toml | 4 ++-- cosmwasm/ucs01-relay/Cargo.toml | 6 +++--- cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml | 4 ++-- cosmwasm/union-ibc/core/Cargo.toml | 4 ++-- cosmwasm/union-ibc/core/light-client-interface/Cargo.toml | 6 +++--- cosmwasm/union-ibc/light-clients/arbitrum/Cargo.toml | 2 +- cosmwasm/union-ibc/light-clients/berachain/Cargo.toml | 2 +- cosmwasm/union-ibc/light-clients/cometbls/Cargo.toml | 2 +- cosmwasm/union-ibc/light-clients/ethereum/Cargo.toml | 4 ++-- cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml | 2 +- cosmwasm/union-ibc/light-clients/linea/Cargo.toml | 2 +- cosmwasm/union-ibc/light-clients/movement/Cargo.toml | 6 +++--- cosmwasm/union-ibc/light-clients/scroll/Cargo.toml | 4 ++-- cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml | 2 +- 16 files changed, 30 insertions(+), 30 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 23132af280..8d1d5a716d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -274,10 +274,10 @@ bytes = { version = "1.2.1", default-features = false } chrono = { version = "0.4.26", default-features = false } clap = { version = "4.3.0", default-features = false, features = ["std"] } # clap has a fake std feature that is required to be enabled by default color-eyre = { version = "0.6.2", default-features = false } -cosmwasm-schema = { version = "1.5", default-features = false } -cosmwasm-std = { version = "1.5.4", default-features = false } +cosmwasm-schema = { version = "2.1.5", default-features = false } +cosmwasm-std = { version = "2.1.5", default-features = false } crossbeam-queue = { version = "0.3.8", default-features = false } -cw-storage-plus = { version = "1.2", default-features = false } +cw-storage-plus = { version = "2.0.0", default-features = false } dashmap = { version = "5.5.3", default-features = false } derive_more = { version = "0.99.17", default-features = false } either = { version = "1.9.0", default-features = false } diff --git a/cosmwasm/token-factory-api/Cargo.toml b/cosmwasm/token-factory-api/Cargo.toml index 7b6484705e..1ef88c48cb 100644 --- a/cosmwasm/token-factory-api/Cargo.toml +++ b/cosmwasm/token-factory-api/Cargo.toml @@ -7,5 +7,5 @@ version = "0.1.0" workspace = true [dependencies] -cosmwasm-schema = { version = "2.0.0" } -cosmwasm-std = { version = "2.0.0" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true } diff --git a/cosmwasm/ucs01-relay-api/Cargo.toml b/cosmwasm/ucs01-relay-api/Cargo.toml index ba942bef78..247cd4aeca 100644 --- a/cosmwasm/ucs01-relay-api/Cargo.toml +++ b/cosmwasm/ucs01-relay-api/Cargo.toml @@ -7,8 +7,8 @@ version = "0.1.0" workspace = true [dependencies] -cosmwasm-schema = { version = "2.0.0" } -cosmwasm-std = { version = "2.0.0", features = ["stargate"] } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, features = ["stargate"] } ethabi = { workspace = true } go-parse-duration = { workspace = true } prost = { workspace = true } diff --git a/cosmwasm/ucs01-relay/Cargo.toml b/cosmwasm/ucs01-relay/Cargo.toml index 10bbade21b..ae78b20454 100644 --- a/cosmwasm/ucs01-relay/Cargo.toml +++ b/cosmwasm/ucs01-relay/Cargo.toml @@ -18,10 +18,10 @@ library = [] [dependencies] base58 = { version = "0.2" } -cosmwasm-schema = { version = "2.1.0" } -cosmwasm-std = { version = "2.1.0", features = ["stargate", "cosmwasm_2_1", "abort"] } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, features = ["stargate", "cosmwasm_2_1", "abort"] } cw-controllers = { version = "2.0.0" } -cw-storage-plus = { version = "2.0.0" } +cw-storage-plus = { workspace = true } cw2 = { version = "2.0.0" } ethabi = { workspace = true } go-parse-duration = { workspace = true } diff --git a/cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml b/cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml index 1850d97927..062144261e 100644 --- a/cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml +++ b/cosmwasm/union-ibc/app/ucs00-pingpong/Cargo.toml @@ -17,8 +17,8 @@ library = [] [dependencies] cosmwasm-schema = { workspace = true } -cosmwasm-std = { version = "2.1.4", features = ["stargate"] } -cw-storage-plus = { version = "2.0.0" } +cosmwasm-std = { workspace = true, features = ["stargate"] } +cw-storage-plus = { workspace = true } ethabi = { workspace = true } serde = { workspace = true, features = ["derive"] } thiserror = { workspace = true } diff --git a/cosmwasm/union-ibc/core/Cargo.toml b/cosmwasm/union-ibc/core/Cargo.toml index 37ead0b62a..54510384c3 100644 --- a/cosmwasm/union-ibc/core/Cargo.toml +++ b/cosmwasm/union-ibc/core/Cargo.toml @@ -18,8 +18,8 @@ library = [] [dependencies] alloy = { workspace = true, features = ["sol-types"] } cosmwasm-schema = { workspace = true } -cosmwasm-std = { version = "2.1.4", features = ["abort"] } -cw-storage-plus = { version = "2.0.0" } +cosmwasm-std = { workspace = true, features = ["abort"] } +cw-storage-plus = { workspace = true } ethabi = { workspace = true } hex = { workspace = true } ibc-solidity = { workspace = true, features = ["serde"] } diff --git a/cosmwasm/union-ibc/core/light-client-interface/Cargo.toml b/cosmwasm/union-ibc/core/light-client-interface/Cargo.toml index 025da291e5..e6a052d873 100644 --- a/cosmwasm/union-ibc/core/light-client-interface/Cargo.toml +++ b/cosmwasm/union-ibc/core/light-client-interface/Cargo.toml @@ -6,9 +6,9 @@ repository.workspace = true version = "0.1.0" [dependencies] -cosmwasm-schema = { version = "2.1.4", package = "cosmwasm-schema" } -cosmwasm-std = { version = "2.1.4", package = "cosmwasm-std" } -cw-storage-plus = { version = "2.0.0", package = "cw-storage-plus" } +cosmwasm-schema = { workspace = true, package = "cosmwasm-schema" } +cosmwasm-std = { workspace = true, package = "cosmwasm-std" } +cw-storage-plus = { workspace = true, package = "cw-storage-plus" } frame-support-procedural.workspace = true macros.workspace = true schemars = { workspace = true } diff --git a/cosmwasm/union-ibc/light-clients/arbitrum/Cargo.toml b/cosmwasm/union-ibc/light-clients/arbitrum/Cargo.toml index ad323802ab..3e4fa5cfe8 100644 --- a/cosmwasm/union-ibc/light-clients/arbitrum/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/arbitrum/Cargo.toml @@ -15,7 +15,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] arbitrum-light-client-types = { workspace = true, features = ["serde", "ethabi"] } arbitrum-verifier = { workspace = true } -cosmwasm-std = { version = "2.1.4", features = ["abort", "cosmwasm_2_1"] } +cosmwasm-std = { workspace = true, features = ["abort", "cosmwasm_2_1"] } ethereum-light-client = { workspace = true, features = ["library"] } ethereum-light-client-types = { workspace = true } evm-storage-verifier = { workspace = true } diff --git a/cosmwasm/union-ibc/light-clients/berachain/Cargo.toml b/cosmwasm/union-ibc/light-clients/berachain/Cargo.toml index 9f28d1b633..0590b24238 100644 --- a/cosmwasm/union-ibc/light-clients/berachain/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/berachain/Cargo.toml @@ -18,7 +18,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] beacon-api-types = { workspace = true, features = ["ssz"] } bytes = { workspace = true } -cosmwasm-std = { version = "2.1.4", features = ["abort", "cosmwasm_2_1"] } +cosmwasm-std = { workspace = true, features = ["abort", "cosmwasm_2_1"] } ethereum-light-client = { workspace = true, features = ["library"] } hex = { workspace = true } schemars = { workspace = true } diff --git a/cosmwasm/union-ibc/light-clients/cometbls/Cargo.toml b/cosmwasm/union-ibc/light-clients/cometbls/Cargo.toml index b02ea42631..bfc694489b 100644 --- a/cosmwasm/union-ibc/light-clients/cometbls/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/cometbls/Cargo.toml @@ -19,7 +19,7 @@ crate-type = ["cdylib", "rlib"] bytes = { workspace = true } cometbls-groth16-verifier = { workspace = true } cometbls-light-client-types = { workspace = true, features = ["serde", "ethabi"] } -cosmwasm-std = { version = "2.1.4", features = ["abort", "iterator", "cosmwasm_2_1"] } +cosmwasm-std = { workspace = true, features = ["abort", "iterator", "cosmwasm_2_1"] } hex = { workspace = true } ics23 = { workspace = true } schemars = { workspace = true } diff --git a/cosmwasm/union-ibc/light-clients/ethereum/Cargo.toml b/cosmwasm/union-ibc/light-clients/ethereum/Cargo.toml index 6074d4decc..7fbc34dd70 100644 --- a/cosmwasm/union-ibc/light-clients/ethereum/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/ethereum/Cargo.toml @@ -18,8 +18,8 @@ crate-type = ["cdylib", "rlib"] [dependencies] alloy = { workspace = true, features = ["sol-types"] } beacon-api-types = { workspace = true } -cosmwasm-schema = { version = "2.1.4" } -cosmwasm-std = { version = "2.1.4", features = ["abort", "cosmwasm_2_1"] } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, features = ["abort", "cosmwasm_2_1"] } ethereum-light-client-types = { workspace = true, features = ["serde", "ethabi"] } ethereum-sync-protocol = { workspace = true } evm-storage-verifier = { workspace = true } diff --git a/cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml b/cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml index 8253099f40..2c2809eda0 100644 --- a/cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/evm-in-cosmos/Cargo.toml @@ -14,7 +14,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] cometbls-light-client-types = { workspace = true, features = ["proto"] } -cosmwasm-std = { version = "2.1.4", features = ["abort"] } +cosmwasm-std = { workspace = true, features = ["abort"] } # ethereum-light-client = { workspace = true, features = ["mainnet", "library"] } ics008-wasm-client = { workspace = true } ics23 = { workspace = true } diff --git a/cosmwasm/union-ibc/light-clients/linea/Cargo.toml b/cosmwasm/union-ibc/light-clients/linea/Cargo.toml index 69992f77ef..578f5a31e7 100644 --- a/cosmwasm/union-ibc/light-clients/linea/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/linea/Cargo.toml @@ -13,7 +13,7 @@ workspace = true crate-type = ["cdylib", "rlib"] [dependencies] -cosmwasm-std = { version = "2.1.4", features = ["abort"] } +cosmwasm-std = { workspace = true, features = ["abort"] } ethereum-light-client = { workspace = true, features = ["mainnet", "library"] } evm-storage-verifier = { workspace = true } gnark-mimc = { workspace = true } diff --git a/cosmwasm/union-ibc/light-clients/movement/Cargo.toml b/cosmwasm/union-ibc/light-clients/movement/Cargo.toml index fdffbf6ffd..ce4b19e7c4 100644 --- a/cosmwasm/union-ibc/light-clients/movement/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/movement/Cargo.toml @@ -8,9 +8,9 @@ version = "0.1.0" [dependencies] aptos-verifier = { workspace = true } bcs = { workspace = true } -cosmwasm-schema = { version = "2.1.4" } -cosmwasm-std = { version = "2.1.4", features = ["abort"] } -cw-storage-plus = { version = "2.0.0" } +cosmwasm-schema = { workspace = true } +cosmwasm-std = { workspace = true, features = ["abort"] } +cw-storage-plus = { workspace = true } ethereum-light-client-types = { workspace = true } evm-storage-verifier = { workspace = true } hex = { workspace = true, features = ["alloc"] } diff --git a/cosmwasm/union-ibc/light-clients/scroll/Cargo.toml b/cosmwasm/union-ibc/light-clients/scroll/Cargo.toml index ad80f6fe96..105a3c4ff8 100644 --- a/cosmwasm/union-ibc/light-clients/scroll/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/scroll/Cargo.toml @@ -13,8 +13,8 @@ workspace = true crate-type = ["cdylib", "rlib"] [dependencies] -cosmwasm-std = { version = "2.1.4", features = ["abort"] } -cw-storage-plus = { version = "2.0.0" } +cosmwasm-std = { workspace = true, features = ["abort"] } +cw-storage-plus = { workspace = true } ethereum-light-client = { workspace = true, features = ["library"] } ethereum-light-client-types = { workspace = true } evm-storage-verifier = { workspace = true } diff --git a/cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml b/cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml index fc992d28ea..34d2111e02 100644 --- a/cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml @@ -17,7 +17,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] bytes = { workspace = true } -cosmwasm-std = { version = "2.1.4", features = ["abort", "cosmwasm_2_1"] } +cosmwasm-std = { workspace = true, features = ["abort", "cosmwasm_2_1"] } hex = { workspace = true } prost = { workspace = true } protos = { workspace = true, features = ["proto_full", "std"] } From ca5a3a03e9a79b2ebef6458ccfe41444ae19e8a9 Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:45:30 -0600 Subject: [PATCH 03/11] fix: use cosmwasm-std v2.1.4 in workspace --- Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8d1d5a716d..b885172834 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -274,8 +274,8 @@ bytes = { version = "1.2.1", default-features = false } chrono = { version = "0.4.26", default-features = false } clap = { version = "4.3.0", default-features = false, features = ["std"] } # clap has a fake std feature that is required to be enabled by default color-eyre = { version = "0.6.2", default-features = false } -cosmwasm-schema = { version = "2.1.5", default-features = false } -cosmwasm-std = { version = "2.1.5", default-features = false } +cosmwasm-schema = { version = "2.1.4", default-features = false } +cosmwasm-std = { version = "2.1.4", default-features = false } crossbeam-queue = { version = "0.3.8", default-features = false } cw-storage-plus = { version = "2.0.0", default-features = false } dashmap = { version = "5.5.3", default-features = false } From 987ffb0bf739249369c864844b96f17655fa365a Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Mon, 16 Dec 2024 22:22:21 -0600 Subject: [PATCH 04/11] fix(unionlabs): enable cosmwasm-std std in unionlabs --- Cargo.lock | 24 ++++++++++++------------ lib/chain-utils/src/cosmos_sdk.rs | 1 + lib/unionlabs/Cargo.toml | 2 +- 3 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d1952257b9..6267f39253 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6371,7 +6371,7 @@ dependencies = [ name = "ics008-wasm-client" version = "0.1.0" dependencies = [ - "cosmwasm-std 1.5.8", + "cosmwasm-std 2.1.4", "frame-support-procedural", "macros", "prost 0.12.6", @@ -8016,8 +8016,8 @@ dependencies = [ name = "multicall" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.5.8", - "cosmwasm-std 1.5.8", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", "hex", "serde", "serde_json", @@ -12819,9 +12819,9 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" name = "ucs00-pingpong" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.5.8", - "cosmwasm-std 1.5.8", - "cw-storage-plus 1.2.0", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", + "cw-storage-plus 2.0.0", "ethabi", "hex", "serde", @@ -12884,9 +12884,9 @@ dependencies = [ name = "ucs02-nft" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.5.8", - "cosmwasm-std 1.5.8", - "cw-storage-plus 1.2.0", + "cosmwasm-schema 2.1.4", + "cosmwasm-std 2.1.4", + "cw-storage-plus 2.0.0", "ethabi", "ics721", "ics721-base", @@ -12999,7 +12999,7 @@ name = "union-ibc" version = "1.0.0" dependencies = [ "alloy", - "cosmwasm-schema 1.5.8", + "cosmwasm-schema 2.1.4", "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "ethabi", @@ -13046,7 +13046,7 @@ dependencies = [ name = "union-ibc-ucs00-pingpong" version = "1.0.0" dependencies = [ - "cosmwasm-schema 1.5.8", + "cosmwasm-schema 2.1.4", "cosmwasm-std 2.1.4", "cw-storage-plus 2.0.0", "ethabi", @@ -13071,7 +13071,7 @@ dependencies = [ "bs58 0.4.0", "chrono", "clap 4.5.4", - "cosmwasm-std 1.5.8", + "cosmwasm-std 2.1.4", "derive_more 0.99.17", "either", "enumorph", diff --git a/lib/chain-utils/src/cosmos_sdk.rs b/lib/chain-utils/src/cosmos_sdk.rs index 8810516ed2..fa98d974d4 100644 --- a/lib/chain-utils/src/cosmos_sdk.rs +++ b/lib/chain-utils/src/cosmos_sdk.rs @@ -1,5 +1,6 @@ use std::sync::Arc; +use bip32::secp256k1::ecdsa::signature::SignatureEncoding; use prost::{Message, Name}; use serde::{Deserialize, Serialize}; use sha2::Digest; diff --git a/lib/unionlabs/Cargo.toml b/lib/unionlabs/Cargo.toml index 8e29115ce3..a62d2dc969 100644 --- a/lib/unionlabs/Cargo.toml +++ b/lib/unionlabs/Cargo.toml @@ -16,7 +16,7 @@ bip32 = { workspace = true, features = ["secp256k1"] } bitvec = { workspace = true } chrono = { workspace = true, features = ["alloc"] } clap = { workspace = true, features = ["derive"] } -cosmwasm-std = { workspace = true, optional = true } +cosmwasm-std = { workspace = true, optional = true,features = ["std"] } derive_more = { workspace = true, features = ["display"] } either = { workspace = true } enumorph = { workspace = true } From f8288b58fdb2238d39408e36e74bd1fb355349aa Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Tue, 17 Dec 2024 14:41:16 -0600 Subject: [PATCH 05/11] fix(cosmwasm): update to 2.0 fixes --- Cargo.lock | 6 +++--- cosmwasm/ucs00-pingpong/src/ibc.rs | 13 +++++-------- cosmwasm/ucs01-relay-api/Cargo.toml | 2 +- cosmwasm/ucs02-nft/Cargo.toml | 6 +++--- .../union-ibc/light-clients/tendermint/Cargo.toml | 2 +- .../light-clients/tendermint/src/storage.rs | 2 +- 6 files changed, 14 insertions(+), 17 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6267f39253..1abd8959d8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12884,9 +12884,9 @@ dependencies = [ name = "ucs02-nft" version = "1.0.0" dependencies = [ - "cosmwasm-schema 2.1.4", - "cosmwasm-std 2.1.4", - "cw-storage-plus 2.0.0", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", + "cw-storage-plus 1.2.0", "ethabi", "ics721", "ics721-base", diff --git a/cosmwasm/ucs00-pingpong/src/ibc.rs b/cosmwasm/ucs00-pingpong/src/ibc.rs index 3b8ee51ee8..b941d873f5 100644 --- a/cosmwasm/ucs00-pingpong/src/ibc.rs +++ b/cosmwasm/ucs00-pingpong/src/ibc.rs @@ -82,12 +82,10 @@ pub fn ibc_packet_receive( let packet = msg.packet; let ping_packet = UCS00PingPong::decode(packet.data)?; do_ibc_packet_receive(deps, env, packet.dest.channel_id, ping_packet).or_else(|err| { - Ok(IbcReceiveResponse::new() - .set_ack(ack_fail()) - .add_attributes(vec![ - attr("success", "false"), - attr("error", err.to_string()), - ])) + Ok(IbcReceiveResponse::new(ack_fail()).add_attributes(vec![ + attr("success", "false"), + attr("error", err.to_string()), + ])) }) } @@ -99,8 +97,7 @@ fn do_ibc_packet_receive( ) -> Result { let config = CONFIG.load(deps.storage)?; let ibc_packet = packet.reverse(&config, env.block.time.nanos(), dest_channel_id); - let res = IbcReceiveResponse::new() - .set_ack(ack_success()) + let res = IbcReceiveResponse::new(ack_success()) .add_message(ibc_packet) .add_attribute("action", if packet.ping { "ping" } else { "pong" }) .add_attribute("success", "true"); diff --git a/cosmwasm/ucs01-relay-api/Cargo.toml b/cosmwasm/ucs01-relay-api/Cargo.toml index 247cd4aeca..7aed224560 100644 --- a/cosmwasm/ucs01-relay-api/Cargo.toml +++ b/cosmwasm/ucs01-relay-api/Cargo.toml @@ -8,7 +8,7 @@ workspace = true [dependencies] cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["stargate"] } +cosmwasm-std = { workspace = true, features = ["stargate", "std"] } ethabi = { workspace = true } go-parse-duration = { workspace = true } prost = { workspace = true } diff --git a/cosmwasm/ucs02-nft/Cargo.toml b/cosmwasm/ucs02-nft/Cargo.toml index db5211bc3f..6700835642 100644 --- a/cosmwasm/ucs02-nft/Cargo.toml +++ b/cosmwasm/ucs02-nft/Cargo.toml @@ -16,9 +16,9 @@ crate-type = ["cdylib", "rlib"] library = [] [dependencies] -cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["stargate"] } -cw-storage-plus = { workspace = true } +cosmwasm-schema = { version = "1.5" } +cosmwasm-std = { version = "1.5.4", features = ["stargate"] } +cw-storage-plus = { version = "1.2" } ethabi = { workspace = true } ics721 = { git = "https://github.com/hussein-aitlahcen/cw-ics721", rev = "dd5b7add6fdc81e633084031f8512e5e909dd42a" } ics721-base = { git = "https://github.com/hussein-aitlahcen/cw-ics721", rev = "dd5b7add6fdc81e633084031f8512e5e909dd42a", features = ["library"] } diff --git a/cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml b/cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml index 34d2111e02..981c7de8f9 100644 --- a/cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml +++ b/cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml @@ -17,7 +17,7 @@ crate-type = ["cdylib", "rlib"] [dependencies] bytes = { workspace = true } -cosmwasm-std = { workspace = true, features = ["abort", "cosmwasm_2_1"] } +cosmwasm-std = { workspace = true, features = ["abort", "cosmwasm_2_1", "iterator"] } hex = { workspace = true } prost = { workspace = true } protos = { workspace = true, features = ["proto_full", "std"] } diff --git a/cosmwasm/union-ibc/light-clients/tendermint/src/storage.rs b/cosmwasm/union-ibc/light-clients/tendermint/src/storage.rs index 589e5b6e51..df8b20f206 100644 --- a/cosmwasm/union-ibc/light-clients/tendermint/src/storage.rs +++ b/cosmwasm/union-ibc/light-clients/tendermint/src/storage.rs @@ -1,4 +1,4 @@ -use cosmwasm_std::{CustomQuery, Deps, DepsMut}; +use cosmwasm_std::{CustomQuery, Deps, DepsMut, Storage}; use unionlabs::{google::protobuf::timestamp::Timestamp, ibc::core::client::height::Height}; pub const CONSENSUS_STATE_ITER_KEY_PREFIX: &str = "iter_cons"; From e983f876f55f0f91831608a1c979403fe8106bac Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:30:13 -0600 Subject: [PATCH 06/11] fix(ucs00-pingpong): downgrade cosmwasm --- Cargo.lock | 6 +++--- cosmwasm/ucs00-pingpong/Cargo.toml | 6 +++--- cosmwasm/ucs00-pingpong/src/ibc.rs | 13 ++++++++----- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1abd8959d8..04fbb9ec3b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -12819,9 +12819,9 @@ checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" name = "ucs00-pingpong" version = "1.0.0" dependencies = [ - "cosmwasm-schema 2.1.4", - "cosmwasm-std 2.1.4", - "cw-storage-plus 2.0.0", + "cosmwasm-schema 1.5.8", + "cosmwasm-std 1.5.8", + "cw-storage-plus 1.2.0", "ethabi", "hex", "serde", diff --git a/cosmwasm/ucs00-pingpong/Cargo.toml b/cosmwasm/ucs00-pingpong/Cargo.toml index bb706d0e49..d576fc9483 100644 --- a/cosmwasm/ucs00-pingpong/Cargo.toml +++ b/cosmwasm/ucs00-pingpong/Cargo.toml @@ -16,9 +16,9 @@ crate-type = ["cdylib", "rlib"] library = [] [dependencies] -cosmwasm-schema = { workspace = true } -cosmwasm-std = { workspace = true, features = ["stargate"] } -cw-storage-plus = { workspace = true } +cosmwasm-schema = { version = "1.5" } +cosmwasm-std = { version = "1.5.4", features = ["stargate"] } +cw-storage-plus = { version = "1.2" } ethabi = { workspace = true } serde = { workspace = true, features = ["derive"] } thiserror = { workspace = true } diff --git a/cosmwasm/ucs00-pingpong/src/ibc.rs b/cosmwasm/ucs00-pingpong/src/ibc.rs index b941d873f5..3b8ee51ee8 100644 --- a/cosmwasm/ucs00-pingpong/src/ibc.rs +++ b/cosmwasm/ucs00-pingpong/src/ibc.rs @@ -82,10 +82,12 @@ pub fn ibc_packet_receive( let packet = msg.packet; let ping_packet = UCS00PingPong::decode(packet.data)?; do_ibc_packet_receive(deps, env, packet.dest.channel_id, ping_packet).or_else(|err| { - Ok(IbcReceiveResponse::new(ack_fail()).add_attributes(vec![ - attr("success", "false"), - attr("error", err.to_string()), - ])) + Ok(IbcReceiveResponse::new() + .set_ack(ack_fail()) + .add_attributes(vec![ + attr("success", "false"), + attr("error", err.to_string()), + ])) }) } @@ -97,7 +99,8 @@ fn do_ibc_packet_receive( ) -> Result { let config = CONFIG.load(deps.storage)?; let ibc_packet = packet.reverse(&config, env.block.time.nanos(), dest_channel_id); - let res = IbcReceiveResponse::new(ack_success()) + let res = IbcReceiveResponse::new() + .set_ack(ack_success()) .add_message(ibc_packet) .add_attribute("action", if packet.ping { "ping" } else { "pong" }) .add_attribute("success", "true"); From 9273cc42623f57060d6faa0a4dbeb5f9539c1df8 Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:30:49 -0600 Subject: [PATCH 07/11] chore: fmt --- lib/unionlabs/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/unionlabs/Cargo.toml b/lib/unionlabs/Cargo.toml index a62d2dc969..c2f30a7910 100644 --- a/lib/unionlabs/Cargo.toml +++ b/lib/unionlabs/Cargo.toml @@ -16,7 +16,7 @@ bip32 = { workspace = true, features = ["secp256k1"] } bitvec = { workspace = true } chrono = { workspace = true, features = ["alloc"] } clap = { workspace = true, features = ["derive"] } -cosmwasm-std = { workspace = true, optional = true,features = ["std"] } +cosmwasm-std = { workspace = true, optional = true, features = ["std"] } derive_more = { workspace = true, features = ["display"] } either = { workspace = true } enumorph = { workspace = true } From 7192c8b82458bbfdbde714ad4aa10613bd1434c4 Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Tue, 17 Dec 2024 15:59:06 -0600 Subject: [PATCH 08/11] fix(multicall): remove unnecessary into --- cosmwasm/multicall/src/contract.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmwasm/multicall/src/contract.rs b/cosmwasm/multicall/src/contract.rs index df48805c6d..cfa483f017 100644 --- a/cosmwasm/multicall/src/contract.rs +++ b/cosmwasm/multicall/src/contract.rs @@ -43,7 +43,7 @@ pub fn execute( }, )?; for (denom, amount) in expected_funds.into_iter() { - if !has_coins(&info.funds, &Coin::new(amount.into(), denom)) { + if !has_coins(&info.funds, &Coin::new(amount, denom)) { return Err(ContractError::FundsMismatch); } } From cad6859752f7278e01f865ba33c1970e378e67fe Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:44:41 -0600 Subject: [PATCH 09/11] fix(libwasmvm): add libwasmvm v1.5.2 --- flake.lock | 56 +---------------------------------- flake.nix | 12 -------- networks/osmosis.nix | 6 ++-- networks/stargaze.nix | 6 ++-- tools/libwasmvm/libwasmvm.nix | 26 +++++++++++++--- 5 files changed, 29 insertions(+), 77 deletions(-) diff --git a/flake.lock b/flake.lock index 6acd73eb00..e222e83036 100644 --- a/flake.lock +++ b/flake.lock @@ -581,10 +581,7 @@ "v0_23_0": "v0_23_0", "v0_24_0": "v0_24_0", "v0_25_0": "v0_25_0", - "wasmd": "wasmd", - "wasmvm": "wasmvm", - "wasmvm-2_1_2": "wasmvm-2_1_2", - "wasmvm-2_1_3": "wasmvm-2_1_3" + "wasmd": "wasmd" } }, "rust-overlay": { @@ -794,57 +791,6 @@ "rev": "913c24df4e0a7a3d791d27fc95313d559e9428b6", "type": "github" } - }, - "wasmvm": { - "flake": false, - "locked": { - "lastModified": 1723135235, - "narHash": "sha256-DGQHC20eMa1CDIx9fWYTTBxdFDCPoS/SsEDJnWJ+7bA=", - "owner": "CosmWasm", - "repo": "wasmvm", - "rev": "9f85c0f44fb8a5573be8e461cad12f784c544c4b", - "type": "github" - }, - "original": { - "owner": "CosmWasm", - "ref": "v1.5.4", - "repo": "wasmvm", - "type": "github" - } - }, - "wasmvm-2_1_2": { - "flake": false, - "locked": { - "lastModified": 1723135029, - "narHash": "sha256-Y3BVRR2T5MLOtXdPK38W8MX8etIuqGcTjvxkaEOyvVM=", - "owner": "CosmWasm", - "repo": "wasmvm", - "rev": "d8f06b73e4d49f8246e1569f032962122427882b", - "type": "github" - }, - "original": { - "owner": "CosmWasm", - "ref": "v2.1.2", - "repo": "wasmvm", - "type": "github" - } - }, - "wasmvm-2_1_3": { - "flake": false, - "locked": { - "lastModified": 1727089467, - "narHash": "sha256-gYrK2EHhXnearJgLX38O6NLI6TfoGtpzA9be/7S/0ZU=", - "owner": "CosmWasm", - "repo": "wasmvm", - "rev": "2a104d140a5b2974dab7c15044da652769018cbe", - "type": "github" - }, - "original": { - "owner": "CosmWasm", - "ref": "v2.1.3", - "repo": "wasmvm", - "type": "github" - } } }, "root": "root", diff --git a/flake.nix b/flake.nix index df7bb2f2b6..a30fea472a 100644 --- a/flake.nix +++ b/flake.nix @@ -69,18 +69,6 @@ }; nix-filter.url = "github:numtide/nix-filter?rev=3449dc925982ad46246cfc36469baf66e1b64f17"; get-flake.url = "github:ursi/get-flake"; - wasmvm = { - url = "github:CosmWasm/wasmvm/v1.5.4"; - flake = false; - }; - wasmvm-2_1_2 = { - url = "github:CosmWasm/wasmvm/v2.1.2"; - flake = false; - }; - wasmvm-2_1_3 = { - url = "github:CosmWasm/wasmvm/v2.1.3"; - flake = false; - }; stargaze = { url = "git+https://github.com/public-awesome/stargaze?ref=main&submodules=1"; flake = false; diff --git a/networks/osmosis.nix b/networks/osmosis.nix index 535e36e528..ecc87eff02 100644 --- a/networks/osmosis.nix +++ b/networks/osmosis.nix @@ -28,18 +28,18 @@ } // ( let - inherit (self'.packages) libwasmvm; + inherit (self'.packages) libwasmvm-1_5_2; in if pkgs.stdenv.isLinux then { # Statically link if we're on linux nativeBuildInputs = [ pkgs.musl - libwasmvm + libwasmvm-1_5_2 ]; ldflags = [ "-linkmode external" - "-extldflags '-Wl,-z,muldefs -z noexecstack -static -L${pkgs.musl}/lib -L${libwasmvm}/lib'" + "-extldflags '-Wl,-z,muldefs -z noexecstack -static -L${pkgs.musl}/lib -L${libwasmvm-1_5_2}/lib'" ]; } # else if pkgs.stdenv.isDarwin then { diff --git a/networks/stargaze.nix b/networks/stargaze.nix index 978c03b6ff..9bbcd92b09 100644 --- a/networks/stargaze.nix +++ b/networks/stargaze.nix @@ -27,18 +27,18 @@ } // ( let - inherit (self'.packages) libwasmvm; + inherit (self'.packages) libwasmvm-1_5_2; in if pkgs.stdenv.isLinux then { # Statically link if we're on linux nativeBuildInputs = [ pkgs.musl - libwasmvm + libwasmvm-1_5_2 ]; ldflags = [ "-linkmode external" - "-extldflags '-Wl,-z,muldefs -z noexecstack -static -L${pkgs.musl}/lib -L${libwasmvm}/lib'" + "-extldflags '-Wl,-z,muldefs -z noexecstack -static -L${pkgs.musl}/lib -L${libwasmvm-1_5_2}/lib'" ]; } # else if pkgs.stdenv.isDarwin then { diff --git a/tools/libwasmvm/libwasmvm.nix b/tools/libwasmvm/libwasmvm.nix index 723cbaaeb9..d8be8fe856 100644 --- a/tools/libwasmvm/libwasmvm.nix +++ b/tools/libwasmvm/libwasmvm.nix @@ -1,4 +1,4 @@ -{ inputs, ... }: +{ ... }: { perSystem = { @@ -118,10 +118,28 @@ cargoArtifacts = craneLib.buildDepsOnly attrs; } ); + wasmvm-1_5_2 = pkgs.fetchFromGitHub { + owner = "CosmWasm"; + repo = "wasmvm"; + rev = "v1.5.2"; + hash = "sha256-3KJq5jFllFSqlm85/iRWYMhu99iuokvR3Ib9Gq3gIjc="; + }; + wasmvm-2_1_2 = pkgs.fetchFromGitHub { + owner = "CosmWasm"; + repo = "wasmvm"; + rev = "v2.1.2"; + hash = "sha256-Y3BVRR2T5MLOtXdPK38W8MX8etIuqGcTjvxkaEOyvVM="; + }; + wasmvm-2_1_3 = pkgs.fetchFromGitHub { + owner = "CosmWasm"; + repo = "wasmvm"; + rev = "v2.1.3"; + hash = "sha256-gYrK2EHhXnearJgLX38O6NLI6TfoGtpzA9be/7S/0ZU="; + }; in { - packages.libwasmvm = mkLibwasmvm_v1 inputs.wasmvm; - packages.libwasmvm-2_1_2 = mkLibwasmvm_v2 inputs.wasmvm-2_1_2; - packages.libwasmvm-2_1_3 = mkLibwasmvm_v2 inputs.wasmvm-2_1_3; + packages.libwasmvm-1_5_2 = mkLibwasmvm_v1 wasmvm-1_5_2; + packages.libwasmvm-2_1_2 = mkLibwasmvm_v2 wasmvm-2_1_2; + packages.libwasmvm-2_1_3 = mkLibwasmvm_v2 wasmvm-2_1_3; }; } From 3f712105b79a59977c9d9933753760c32b478bb1 Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Wed, 18 Dec 2024 11:53:49 -0600 Subject: [PATCH 10/11] chore: fmt --- tools/libwasmvm/libwasmvm.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/libwasmvm/libwasmvm.nix b/tools/libwasmvm/libwasmvm.nix index d8be8fe856..a1f7d7b683 100644 --- a/tools/libwasmvm/libwasmvm.nix +++ b/tools/libwasmvm/libwasmvm.nix @@ -1,4 +1,4 @@ -{ ... }: +_: { perSystem = { From 1a9d740591772e1bc1f6f16edf711621eccfdff7 Mon Sep 17 00:00:00 2001 From: poisonphang <17688291+PoisonPhang@users.noreply.github.com> Date: Wed, 18 Dec 2024 15:57:26 -0600 Subject: [PATCH 11/11] chore: treefmt --- tools/libwasmvm/libwasmvm.nix | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/libwasmvm/libwasmvm.nix b/tools/libwasmvm/libwasmvm.nix index a1f7d7b683..7ebe7d8be4 100644 --- a/tools/libwasmvm/libwasmvm.nix +++ b/tools/libwasmvm/libwasmvm.nix @@ -1,5 +1,4 @@ -_: -{ +_: { perSystem = { pkgs,