From 7960ba5ad64ecccd0f9106ee2d21d20a6099b671 Mon Sep 17 00:00:00 2001 From: Mateo Date: Fri, 19 Apr 2024 12:57:42 +0200 Subject: [PATCH] Bump crates to the latest versions --- .github/workflows/pull-request.yaml | 2 +- ethcontract-mock/Cargo.toml | 4 ++-- ethcontract/Cargo.toml | 24 ++++++++++++------------ ethcontract/src/int.rs | 4 ++-- ethcontract/src/secret.rs | 3 ++- examples/Cargo.toml | 4 ++-- examples/examples/kms.rs | 2 +- 7 files changed, 22 insertions(+), 21 deletions(-) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index 39aad134..7d077e2d 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -8,7 +8,7 @@ jobs: strategy: matrix: include: - - rust: 1.70.0 + - rust: 1.77.2 examples: false continue-on-error: false - rust: stable diff --git a/ethcontract-mock/Cargo.toml b/ethcontract-mock/Cargo.toml index 7a4ffee3..3a7f3b62 100644 --- a/ethcontract-mock/Cargo.toml +++ b/ethcontract-mock/Cargo.toml @@ -14,10 +14,10 @@ Tools for mocking ethereum contracts. [dependencies] ethcontract = { version = "0.25.6", path = "../ethcontract", default-features = false, features = ["derive"] } hex = "0.4" -mockall = "0.11" +mockall = "0.12.1" rlp = "0.5" predicates = "3.0" [dev-dependencies] -tokio = { version = "1.6", features = ["macros", "rt"] } +tokio = { version = "1.37.0", features = ["macros", "rt"] } ethcontract-derive = { version = "0.25.6", path = "../ethcontract-derive", default-features = false } diff --git a/ethcontract/Cargo.toml b/ethcontract/Cargo.toml index 125efac1..ba7741e7 100644 --- a/ethcontract/Cargo.toml +++ b/ethcontract/Cargo.toml @@ -32,26 +32,26 @@ ws-tls-tokio = ["web3/ws-tls-tokio"] ws-tokio = ["web3/ws-tokio"] [dependencies] -aws-config = { version = "0.55", optional = true } -aws-sdk-kms = { version = "0.28", optional = true } +aws-config = { version = "1.2.0", features = ["behavior-version-latest"], optional = true } +aws-sdk-kms = { version = "1.21.0", optional = true } arrayvec = "0.7" ethcontract-common = { version = "0.25.6", path = "../ethcontract-common" } ethcontract-derive = { version = "0.25.6", path = "../ethcontract-derive", optional = true, default-features = false } futures = "0.3" futures-timer = "3.0" -hex = "0.4" +hex = "0.4.3" jsonrpc-core = "18.0" lazy_static = "1.4" -primitive-types = { version = "0.12", features = ["fp-conversion"] } -rlp = { version = "0.5", default-features = false, optional = true } -secp256k1 = { version = "0.27", features = ["recovery"] } +primitive-types = { version = "0.12.2", features = ["fp-conversion"] } +rlp = { version = "0.5.2", default-features = false, optional = true } +secp256k1 = { version = "0.29.0", features = ["recovery"] } serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -thiserror = "1.0" -uint = "0.9" +serde_json = "1.0.116" +thiserror = "1.0.58" +uint = "0.9.5" web3 = { version = "0.19", default-features = false, features = ["signing"] } -zeroize = "1.1" +zeroize = "1.7.0" [dev-dependencies] -hex-literal = "0.4" -tokio = { version = "1.6", features = ["macros"] } +hex-literal = "0.4.1" +tokio = { version = "1.37.0", features = ["macros"] } diff --git a/ethcontract/src/int.rs b/ethcontract/src/int.rs index ca3951c6..2919bfc3 100644 --- a/ethcontract/src/int.rs +++ b/ethcontract/src/int.rs @@ -1290,11 +1290,11 @@ mod tests { assert_eq!(I256::one().to_string(), "1"); assert_eq!(I256::minus_one().to_string(), "-1"); assert_eq!( - I256::max_value().to_string(), + I256::MAX.to_string(), "57896044618658097711785492504343953926634992332820282019728792003956564819967" ); assert_eq!( - I256::min_value().to_string(), + I256::MIN.to_string(), "-57896044618658097711785492504343953926634992332820282019728792003956564819968" ); } diff --git a/ethcontract/src/secret.rs b/ethcontract/src/secret.rs index 3876319c..ab8b4e65 100644 --- a/ethcontract/src/secret.rs +++ b/ethcontract/src/secret.rs @@ -96,7 +96,8 @@ impl Key for &'_ PrivateKey { } fn sign_message(&self, message: &[u8]) -> Result { - let message = Message::from_slice(message).map_err(|_| SigningError::InvalidMessage)?; + let message = + Message::from_digest_slice(message).map_err(|_| SigningError::InvalidMessage)?; let (recovery_id, signature) = Secp256k1::signing_only() .sign_ecdsa_recoverable(&message, self) .serialize_compact(); diff --git a/examples/Cargo.toml b/examples/Cargo.toml index f75e0cef..7941ecbd 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -8,5 +8,5 @@ autobins = false [dev-dependencies] ethcontract = { path = "../ethcontract", features = ["aws-kms"] } -futures = "0.3" -tokio = { version = "1.6", features = ["macros"] } +futures = "0.3.30" +tokio = { version = "1.37.0", features = ["macros"] } diff --git a/examples/examples/kms.rs b/examples/examples/kms.rs index 5892fb9b..5579e5df 100644 --- a/examples/examples/kms.rs +++ b/examples/examples/kms.rs @@ -8,7 +8,7 @@ use std::env; #[tokio::main] async fn main() { // Run `aws configure export-credentials --profile cow-staging --format env` to get required env variable locally - let config = aws_config::load_from_env().await; + let config = aws_config::from_env().load().await; let account = kms::Account::new( (&config).into(), &env::var("KMS_KEY_ID").expect("KMS_KEY_ID not set"),