Skip to content

Commit

Permalink
chore(union-ibc): update cosmwasm-std to 2.1.4 (#3381)
Browse files Browse the repository at this point in the history
- Update cosmwasm-std from 1.5 to 2.1 for workspace
  - Kept ucs00 and ucs02 on cosmwasm-std 1.5
- Updates cw-storage-plus to 2.0.0 to support cosmwasm-std 2.0+
  • Loading branch information
PoisonPhang authored Dec 18, 2024
2 parents 8288811 + 1a9d740 commit eb0ee95
Show file tree
Hide file tree
Showing 24 changed files with 73 additions and 121 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,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.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 = "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 }
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/multicall/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
4 changes: 2 additions & 2 deletions cosmwasm/token-factory-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
6 changes: 3 additions & 3 deletions cosmwasm/ucs00-pingpong/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions cosmwasm/ucs01-relay-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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", "std"] }
ethabi = { workspace = true }
go-parse-duration = { workspace = true }
prost = { workspace = true }
Expand Down
6 changes: 3 additions & 3 deletions cosmwasm/ucs01-relay/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions cosmwasm/ucs02-nft/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
6 changes: 3 additions & 3 deletions cosmwasm/union-ibc/core/light-client-interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/union-ibc/light-clients/arbitrum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/union-ibc/light-clients/berachain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/union-ibc/light-clients/cometbls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions cosmwasm/union-ibc/light-clients/ethereum/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions cosmwasm/union-ibc/light-clients/movement/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"] }
Expand Down
4 changes: 2 additions & 2 deletions cosmwasm/union-ibc/light-clients/scroll/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/union-ibc/light-clients/tendermint/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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", "iterator"] }
hex = { workspace = true }
prost = { workspace = true }
protos = { workspace = true, features = ["proto_full", "std"] }
Expand Down
2 changes: 1 addition & 1 deletion cosmwasm/union-ibc/light-clients/tendermint/src/storage.rs
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
56 changes: 1 addition & 55 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 0 additions & 12 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions lib/chain-utils/src/cosmos_sdk.rs
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
2 changes: 1 addition & 1 deletion lib/unionlabs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
Expand Down
6 changes: 3 additions & 3 deletions networks/osmosis.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions networks/stargaze.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading

0 comments on commit eb0ee95

Please sign in to comment.