diff --git a/Cargo.lock b/Cargo.lock index 4f0fab00f8..9f2d2f7a14 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -677,7 +677,7 @@ dependencies = [ [[package]] name = "client-core" -version = "1.1.10" +version = "1.1.11" dependencies = [ "async-trait", "dashmap 5.4.0", @@ -1802,7 +1802,7 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "explorer-api" -version = "1.1.10" +version = "1.1.11" dependencies = [ "chrono", "clap 4.1.4", @@ -3281,7 +3281,7 @@ dependencies = [ [[package]] name = "nym-api" -version = "1.1.11" +version = "1.1.12" dependencies = [ "anyhow", "async-trait", @@ -3391,7 +3391,7 @@ dependencies = [ [[package]] name = "nym-cli" -version = "1.1.10" +version = "1.1.11" dependencies = [ "anyhow", "base64 0.13.1", @@ -3449,7 +3449,7 @@ dependencies = [ [[package]] name = "nym-client" -version = "1.1.10" +version = "1.1.11" dependencies = [ "clap 4.1.4", "client-core", @@ -3543,7 +3543,7 @@ dependencies = [ [[package]] name = "nym-gateway" -version = "1.1.10" +version = "1.1.11" dependencies = [ "anyhow", "async-trait", @@ -3620,7 +3620,7 @@ dependencies = [ [[package]] name = "nym-mixnode" -version = "1.1.11" +version = "1.1.12" dependencies = [ "anyhow", "atty", @@ -3675,7 +3675,7 @@ dependencies = [ [[package]] name = "nym-network-requester" -version = "1.1.10" +version = "1.1.11" dependencies = [ "async-trait", "clap 4.1.4", @@ -3713,7 +3713,7 @@ dependencies = [ [[package]] name = "nym-network-statistics" -version = "1.1.10" +version = "1.1.11" dependencies = [ "dirs", "log", @@ -3788,7 +3788,7 @@ dependencies = [ [[package]] name = "nym-socks5-client" -version = "1.1.10" +version = "1.1.11" dependencies = [ "clap 4.1.4", "client-core", diff --git a/common/client-libs/validator-client/Cargo.toml b/common/client-libs/validator-client/Cargo.toml index 379cf546b0..1353efd0ad 100644 --- a/common/client-libs/validator-client/Cargo.toml +++ b/common/client-libs/validator-client/Cargo.toml @@ -36,9 +36,9 @@ nym-api-requests = { path = "../../../nym-api/nym-api-requests" } # at some point it might be possible to make it wasm-compatible # perhaps after https://github.com/cosmos/cosmos-rust/pull/97 is resolved (and tendermint-rs is updated) async-trait = { version = "0.1.51", optional = true } -bip39 = { version = "1", features = ["rand"], optional = true } +bip39 = { version = "2", features = ["rand"], optional = true } nym-config = { path = "../../config", optional = true } -cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support", features = ["rpc", "bip32", "cosmwasm"], optional = true} +cosmrs = { version = "0.8.0", features = ["rpc", "bip32", "cosmwasm"], optional = true} cw3 = { version = "0.13.4", optional = true } cw4 = { version = "0.13.4", optional = true } prost = { version = "0.10", default-features = false, optional = true } diff --git a/common/client-libs/validator-client/src/nyxd/fee/mod.rs b/common/client-libs/validator-client/src/nyxd/fee/mod.rs index b887c08128..8758697337 100644 --- a/common/client-libs/validator-client/src/nyxd/fee/mod.rs +++ b/common/client-libs/validator-client/src/nyxd/fee/mod.rs @@ -121,7 +121,7 @@ impl GasAdjustable for Gas { mod sealed { use cosmrs::tx::{self, Gas}; use cosmrs::Coin as CosmosCoin; - use cosmrs::{AccountId, Decimal as CosmosDecimal, Denom as CosmosDenom}; + use cosmrs::{AccountId, Denom as CosmosDenom}; use serde::{Deserialize, Deserializer, Serialize, Serializer}; fn cosmos_denom_inner_getter(val: &CosmosDenom) -> String { @@ -138,29 +138,11 @@ mod sealed { } } - fn cosmos_decimal_inner_getter(val: &CosmosDecimal) -> u64 { - // haha, this code is so disgusting. I'll make a PR on cosmrs to slightly alleviate those issues... - // note: unwrap here is fine as the to_string is just returning a stringified u64 which, well, is a valid u64 - val.to_string().parse().unwrap() - } - - // at the time of writing it the current cosmrs' Decimal is extremely limited... - #[derive(Serialize, Deserialize)] - #[serde(remote = "CosmosDecimal")] - struct Decimal(#[serde(getter = "cosmos_decimal_inner_getter")] u64); - - impl From for CosmosDecimal { - fn from(val: Decimal) -> Self { - val.0.into() - } - } - #[derive(Serialize, Deserialize, Clone)] struct Coin { #[serde(with = "Denom")] denom: CosmosDenom, - #[serde(with = "Decimal")] - amount: CosmosDecimal, + amount: u128, } impl From for CosmosCoin { diff --git a/common/client-libs/validator-client/src/nyxd/mod.rs b/common/client-libs/validator-client/src/nyxd/mod.rs index e02672682b..a06a23c672 100644 --- a/common/client-libs/validator-client/src/nyxd/mod.rs +++ b/common/client-libs/validator-client/src/nyxd/mod.rs @@ -42,7 +42,7 @@ pub use cosmrs::tendermint::validator::Info as TendermintValidatorInfo; pub use cosmrs::tendermint::Time as TendermintTime; pub use cosmrs::tx::{self, Gas}; pub use cosmrs::Coin as CosmosCoin; -pub use cosmrs::{bip32, AccountId, Decimal, Denom}; +pub use cosmrs::{bip32, AccountId, Denom}; pub use cosmwasm_std::Coin as CosmWasmCoin; pub use fee::{gas_price::GasPrice, GasAdjustable, GasAdjustment}; pub use signing_client::Client as SigningNyxdClient; diff --git a/common/commands/Cargo.toml b/common/commands/Cargo.toml index cf941a1961..4249953100 100644 --- a/common/commands/Cargo.toml +++ b/common/commands/Cargo.toml @@ -25,7 +25,7 @@ toml = "0.5.6" url = "2.2" tap = "1" -cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support" } +cosmrs = "0.8.0" cosmwasm-std = { version = "1.0.0" } validator-client = { path = "../client-libs/validator-client", features = ["nyxd-client"] } diff --git a/common/credentials/Cargo.toml b/common/credentials/Cargo.toml index b69c5f12f5..d9d85d4153 100644 --- a/common/credentials/Cargo.toml +++ b/common/credentials/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] bls12_381 = { version = "0.5", default-features = false, features = ["pairings", "alloc", "experimental"] } -cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support" } +cosmrs = "0.8.0" thiserror = "1.0" # I guess temporarily until we get serde support in coconut up and running diff --git a/common/types/Cargo.toml b/common/types/Cargo.toml index 1bdf334f42..4692c937fa 100644 --- a/common/types/Cargo.toml +++ b/common/types/Cargo.toml @@ -20,7 +20,7 @@ url = "2.2" ts-rs = "6.1.2" cosmwasm-std = "1.0.0" -cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support" } +cosmrs = "0.8.0" validator-client = { path = "../../common/client-libs/validator-client", features = [ "nyxd-client", diff --git a/integrations/bity/Cargo.toml b/integrations/bity/Cargo.toml index 327d3aeeaa..df56ef9e9a 100644 --- a/integrations/bity/Cargo.toml +++ b/integrations/bity/Cargo.toml @@ -11,7 +11,7 @@ thiserror = "1.0" k256 = { version = "0.10", features = ["ecdsa", "sha256"] } eyre = "0.6.5" -cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support" } +cosmrs = "0.8.0" nym-cli-commands = { path = "../../common/commands" } validator-client = { path = "../../common/client-libs/validator-client", features = [ diff --git a/nym-api/nym-api-requests/Cargo.toml b/nym-api/nym-api-requests/Cargo.toml index 8290327315..dd24f4a083 100644 --- a/nym-api/nym-api-requests/Cargo.toml +++ b/nym-api/nym-api-requests/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" [dependencies] bs58 = "0.4.0" -cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support" } +cosmrs = "0.8.0" cosmwasm-std = { version = "1.0.0", default-features = false } getset = "0.1.1" schemars = { version = "0.8", features = ["preserve_order"] } diff --git a/nym-wallet/nym-wallet-types/Cargo.toml b/nym-wallet/nym-wallet-types/Cargo.toml index f8ebba8263..1103b8868f 100644 --- a/nym-wallet/nym-wallet-types/Cargo.toml +++ b/nym-wallet/nym-wallet-types/Cargo.toml @@ -12,7 +12,7 @@ strum = { version = "0.23", features = ["derive"] } ts-rs = "6.1.2" cosmwasm-std = "1.0.0-beta8" -cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support" } +cosmrs = "0.8.0" nym-config = { path = "../../common/config" } nym-network-defaults = { path = "../../common/network-defaults" } diff --git a/nym-wallet/src-tauri/Cargo.toml b/nym-wallet/src-tauri/Cargo.toml index cc72e8812b..5268f1d883 100644 --- a/nym-wallet/src-tauri/Cargo.toml +++ b/nym-wallet/src-tauri/Cargo.toml @@ -52,7 +52,7 @@ base64 = "0.13" zeroize = "1.4.3" cosmwasm-std = "1.0.0" -cosmrs = { git = "https://github.com/neacsu/cosmos-rust", branch = "neacsu/feegrant_support" } +cosmrs = "0.8.0" validator-client = { path = "../../common/client-libs/validator-client", features = [ "nyxd-client",