diff --git a/v4-client-rs/Cargo.toml b/v4-client-rs/Cargo.toml index a8754ef3..7ea7aaab 100644 --- a/v4-client-rs/Cargo.toml +++ b/v4-client-rs/Cargo.toml @@ -15,6 +15,6 @@ async-trait = "0.1" bigdecimal = { version = "0.4", features = ["serde"] } derive_more = { version = "1", features = ["full"] } log = "0.4" -thiserror = "1" -tokio = { version = "1.39", features = ["full"] } -dydx-proto = "0.1.0" +thiserror = "2" +tokio = { version = "1.41", features = ["fs", "rt-multi-thread"] } +dydx-proto = "0.2.0" diff --git a/v4-client-rs/client/Cargo.toml b/v4-client-rs/client/Cargo.toml index e62fc7c0..ae318d17 100644 --- a/v4-client-rs/client/Cargo.toml +++ b/v4-client-rs/client/Cargo.toml @@ -18,7 +18,7 @@ noble = [ "dep:ibc-proto" ] telemetry = [ - "dep:metrics", + "dep:metrics", ] [dependencies] @@ -26,32 +26,32 @@ anyhow.workspace = true async-trait.workspace = true bigdecimal.workspace = true bip32 = { version = "0.5", default-features = false, features = ["bip39", "alloc", "secp256k1"] } -cosmrs = "0.16" +cosmrs = "0.21" chrono = { version = "0.4", features = ["serde"] } derive_more.workspace = true futures-util = "0.3" -governor = "0.6" -ibc-proto = { version = "0.46", optional = true } +governor = { version = "0.7", default-features = false, features = ["std"] } +ibc-proto = { version = "0.51", optional = true } log.workspace = true rand = "0.8" reqwest = { version = "0.12", features = ["json"] } serde = { version = "1", features = ["derive"] } serde_json = "1" -serde_with = "3.9" +serde_with = "3.11" strum = { version = "0.26", features = ["derive"] } thiserror.workspace = true -tonic = { version = "0.11", features = ["tls", "tls-roots", "transport", "channel"] } +tonic = { version = "0.12", features = ["tls-native-roots"] } tokio.workspace = true -tokio-tungstenite = { version = "0.23", features = ["native-tls"] } +tokio-tungstenite = { version = "0.24", features = ["native-tls"] } toml = "0.8" -tower = "0.4" +tower = { version = "0.5", features = ["timeout"] } dydx-proto.workspace = true # Telemetry -metrics = { version = "0.23", optional = true } +metrics = { version = "0.24", optional = true } [dev-dependencies] -metrics-exporter-tcp = "0.10.0" -serial_test = "3.1.1" +metrics-exporter-tcp = "0.11.0" +serial_test = "3.2.0" tracing = "0.1" tracing-subscriber = "0.3" diff --git a/v4-client-rs/client/examples/faucet_endpoint.rs b/v4-client-rs/client/examples/faucet_endpoint.rs index 60349d1d..ac9f4ff2 100644 --- a/v4-client-rs/client/examples/faucet_endpoint.rs +++ b/v4-client-rs/client/examples/faucet_endpoint.rs @@ -1,4 +1,6 @@ mod support; + +#[cfg(feature = "faucet")] use anyhow::Result; #[cfg(feature = "faucet")] diff --git a/v4-client-rs/client/examples/noble_transfer.rs b/v4-client-rs/client/examples/noble_transfer.rs index caaa3ef4..b379f3ed 100644 --- a/v4-client-rs/client/examples/noble_transfer.rs +++ b/v4-client-rs/client/examples/noble_transfer.rs @@ -1,3 +1,4 @@ +#[cfg(feature = "noble")] use anyhow::Result; #[cfg(feature = "noble")] diff --git a/v4-client-rs/client/src/noble/mod.rs b/v4-client-rs/client/src/noble/mod.rs index 3bee14e5..67abe3d8 100644 --- a/v4-client-rs/client/src/noble/mod.rs +++ b/v4-client-rs/client/src/noble/mod.rs @@ -64,7 +64,7 @@ pub struct NobleClient { impl NobleClient { /// Connect to the node. pub async fn connect(config: NobleConfig) -> Result { - let tls = ClientTlsConfig::new(); + let tls = ClientTlsConfig::new().with_native_roots(); let endpoint = config.endpoint.clone(); let channel = Channel::from_shared(endpoint)? .tls_config(tls)? @@ -85,6 +85,7 @@ impl NobleClient { pub async fn get_account_balances(&mut self, address: Address) -> Result, Error> { let req = QueryAllBalancesRequest { address: address.to_string(), + resolve_denom: false, pagination: None, }; let balances = self diff --git a/v4-client-rs/client/src/node/client/methods.rs b/v4-client-rs/client/src/node/client/methods.rs index 04974d01..58c81fbf 100644 --- a/v4-client-rs/client/src/node/client/methods.rs +++ b/v4-client-rs/client/src/node/client/methods.rs @@ -44,6 +44,7 @@ impl NodeClient { pub async fn get_account_balances(&mut self, address: &Address) -> Result, Error> { let req = QueryAllBalancesRequest { address: address.to_string(), + resolve_denom: false, pagination: None, }; let balances = self.bank.all_balances(req).await?.into_inner().balances; diff --git a/v4-client-rs/client/src/node/client/mod.rs b/v4-client-rs/client/src/node/client/mod.rs index 58f1f90b..c6e74847 100644 --- a/v4-client-rs/client/src/node/client/mod.rs +++ b/v4-client-rs/client/src/node/client/mod.rs @@ -146,7 +146,7 @@ pub struct NodeClient { impl NodeClient { /// Connect to the node. pub async fn connect(config: NodeConfig) -> Result { - let tls = ClientTlsConfig::new(); + let tls = ClientTlsConfig::new().with_native_roots(); let endpoint = config.endpoint.clone(); let channel = Channel::from_shared(endpoint)? .tls_config(tls)? diff --git a/v4-client-rs/client/tests/env.rs b/v4-client-rs/client/tests/env.rs index 78328038..f6edc20d 100644 --- a/v4-client-rs/client/tests/env.rs +++ b/v4-client-rs/client/tests/env.rs @@ -1,4 +1,6 @@ -use anyhow::{anyhow as err, Error, Result}; +#[cfg(any(feature = "faucet", feature = "noble"))] +use anyhow::anyhow as err; +use anyhow::{Error, Result}; use chrono::{TimeDelta, Utc}; #[cfg(feature = "faucet")] use dydx::faucet::FaucetClient;