Skip to content

Commit cff3dec

Browse files
TropicalDog170xrusowskyzerosnacksDaniPopesdev-n-dough
authored
refactor(deps): reuse aws and gcp package from alloy (#11573)
* use alloy 1.0.30, reuse aws and gcp package from alloy * Update crates/wallets/src/wallet_signer.rs * chore: style Co-Authored-By: Akshat Arora <akshat1@ee.iitr.ac.in> * update * Update crates/wallets/Cargo.toml Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> --------- Co-authored-by: 0xrusowsky <90208954+0xrusowsky@users.noreply.github.com> Co-authored-by: zerosnacks <95942363+zerosnacks@users.noreply.github.com> Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Co-authored-by: Akshat Arora <akshat1@ee.iitr.ac.in>
1 parent f60a1d8 commit cff3dec

File tree

5 files changed

+17
-22
lines changed

5 files changed

+17
-22
lines changed

Cargo.lock

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,12 @@ alloy-pubsub = { version = "1.0.23", default-features = false }
227227
alloy-rpc-client = { version = "1.0.23", default-features = false }
228228
alloy-rpc-types = { version = "1.0.23", default-features = true }
229229
alloy-serde = { version = "1.0.23", default-features = false }
230-
alloy-signer = { version = "1.0.23", default-features = false }
231-
alloy-signer-aws = { version = "1.0.23", default-features = false }
232-
alloy-signer-gcp = { version = "1.0.23", default-features = false }
233-
alloy-signer-ledger = { version = "1.0.23", default-features = false }
234-
alloy-signer-local = { version = "1.0.23", default-features = false }
235-
alloy-signer-trezor = { version = "1.0.23", default-features = false }
230+
alloy-signer = { version = "1.0.30", default-features = false }
231+
alloy-signer-aws = { version = "1.0.30", default-features = false }
232+
alloy-signer-gcp = { version = "1.0.30", default-features = false }
233+
alloy-signer-ledger = { version = "1.0.30", default-features = false }
234+
alloy-signer-local = { version = "1.0.30", default-features = false }
235+
alloy-signer-trezor = { version = "1.0.30", default-features = false }
236236
alloy-transport = { version = "1.0.23", default-features = false }
237237
alloy-transport-http = { version = "1.0.23", default-features = false }
238238
alloy-transport-ipc = { version = "1.0.23", default-features = false }
@@ -292,8 +292,6 @@ tikv-jemallocator = "0.6"
292292

293293
# misc
294294
auto_impl = "1"
295-
aws-config = { version = "1", default-features = true }
296-
aws-sdk-kms = { version = "1", default-features = false }
297295
bytes = "1.10"
298296
walkdir = "2"
299297
prettyplease = "0.2"

crates/wallets/Cargo.toml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,10 @@ alloy-dyn-abi.workspace = true
2727

2828
# aws-kms
2929
alloy-signer-aws = { workspace = true, features = ["eip712"], optional = true }
30-
aws-config = { workspace = true, default-features = true, optional = true }
31-
aws-sdk-kms = { workspace = true, default-features = false, optional = true }
30+
aws-config = { version = "1", default-features = true, optional = true }
3231

3332
# gcp-kms
3433
alloy-signer-gcp = { workspace = true, features = ["eip712"], optional = true }
35-
gcloud-sdk = { version = "0.27.3", features = [
36-
"google-cloud-kms-v1",
37-
"google-longrunning",
38-
], optional = true }
3934

4035
async-trait.workspace = true
4136
clap = { version = "4", features = ["derive", "env", "unicode", "wrap_help"] }
@@ -51,5 +46,5 @@ eth-keystore = "0.5.0"
5146
tokio = { workspace = true, features = ["macros"] }
5247

5348
[features]
54-
aws-kms = ["dep:alloy-signer-aws", "dep:aws-config", "dep:aws-sdk-kms"]
55-
gcp-kms = ["dep:alloy-signer-gcp", "dep:gcloud-sdk"]
49+
aws-kms = ["dep:alloy-signer-aws", "dep:aws-config"]
50+
gcp-kms = ["dep:alloy-signer-gcp"]

crates/wallets/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@ pub use multi_wallet::MultiWalletOpts;
1919
pub use raw_wallet::RawWalletOpts;
2020
pub use wallet::WalletOpts;
2121
pub use wallet_signer::{PendingSigner, WalletSigner};
22+
23+
#[cfg(feature = "aws-kms")]
24+
use aws_config as _;

crates/wallets/src/wallet_signer.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ use async_trait::async_trait;
1212
use std::path::PathBuf;
1313

1414
#[cfg(feature = "aws-kms")]
15-
use {alloy_signer_aws::AwsSigner, aws_config::BehaviorVersion, aws_sdk_kms::Client as AwsClient};
15+
use alloy_signer_aws::{AwsSigner, aws_config::BehaviorVersion, aws_sdk_kms::Client as AwsClient};
1616

1717
#[cfg(feature = "gcp-kms")]
18-
use {
19-
alloy_signer_gcp::{GcpKeyRingRef, GcpSigner, GcpSignerError, KeySpecifier},
18+
use alloy_signer_gcp::{
19+
GcpKeyRingRef, GcpSigner, GcpSignerError, KeySpecifier,
2020
gcloud_sdk::{
2121
GoogleApi,
2222
google::cloud::kms::v1::key_management_service_client::KeyManagementServiceClient,
@@ -56,7 +56,8 @@ impl WalletSigner {
5656
pub async fn from_aws(key_id: String) -> Result<Self> {
5757
#[cfg(feature = "aws-kms")]
5858
{
59-
let config = aws_config::load_defaults(BehaviorVersion::latest()).await;
59+
let config =
60+
alloy_signer_aws::aws_config::load_defaults(BehaviorVersion::latest()).await;
6061
let client = AwsClient::new(&config);
6162

6263
Ok(Self::Aws(AwsSigner::new(client, key_id, None).await?))

0 commit comments

Comments
 (0)