Skip to content

Commit 4d5ef47

Browse files
committed
alloy dep breakdown
1 parent 1dd0850 commit 4d5ef47

8 files changed

Lines changed: 93 additions & 509 deletions

File tree

Cargo.lock

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

src/infra/core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ curl = { optional = true, version = "0.4", features = [
172172
"static-ssl",
173173
] }
174174
curl-sys = { optional = true, version = "0.4" }
175-
datafusion-ethers = { optional = true, version = "53", default-features = false, features = ["eip712"] }
175+
datafusion-ethers = { optional = true, version = "53", features = ["eip712"] }
176176
datafusion-functions-json = { optional = true, version = "0.53" }
177177
rumqttc = { optional = true, version = "0.25", default-features = false, features = [
178178
] }

src/utils/crypto-eip712-utils/Cargo.toml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,16 @@ internal-error = { workspace = true }
3333

3434
# TODO: Molecule: Phase 3: update to alloy@2 crate.
3535
# Blocked by datafusion-ethers & duplicate deps
36-
alloy = { version = "1", default-features = false, features = [
36+
# NOTE: We use alloy sub-crates instead of the meta-crate to avoid pulling in optional dependencies
37+
# that get included anyway due to an old known issue:
38+
# Details: https://github.com/rust-lang/cargo/issues/10801
39+
alloy-core = { version = "1", default-features = false, features = [
40+
"std",
3741
"dyn-abi",
3842
"eip712",
39-
"signer-local",
40-
"signers",
4143
] }
44+
alloy-signer = { version = "1", default-features = false }
45+
alloy-signer-local = { version = "1", default-features = false }
4246
const-hex = { version = "1", default-features = true, features = [] }
4347
nutype = { version = "0.7", default-features = false, features = [] }
4448
serde_json = { version = "1", default-features = false }

src/utils/crypto-eip712-utils/src/eip712_typed_data.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
// the Business Source License, use of this software will be governed
88
// by the Apache License, Version 2.0.
99

10-
use alloy::dyn_abi::TypedData as AlloyEip712TypedData;
11-
use alloy::primitives::B256;
10+
use alloy_core::dyn_abi::TypedData as AlloyEip712TypedData;
11+
use alloy_core::primitives::B256;
1212
use internal_error::{InternalError, ResultIntoInternal};
1313

1414
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

src/utils/crypto-eip712-utils/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// by the Apache License, Version 2.0.
99

1010
// Re-exports
11-
pub use alloy::primitives::b256;
11+
pub use alloy_core::primitives::b256;
1212

1313
mod eip712_typed_data;
1414
mod secp256k1;

src/utils/crypto-eip712-utils/src/secp256k1.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
// the Business Source License, use of this software will be governed
88
// by the Apache License, Version 2.0.
99

10-
use alloy::primitives::{Address, B256, Signature, keccak256};
11-
use alloy::signers::k256::ecdsa::{SigningKey, VerifyingKey};
12-
use alloy::signers::local::LocalSigner;
10+
use alloy_core::primitives::{Address, B256, Signature, keccak256};
11+
use alloy_signer::k256::ecdsa::{SigningKey, VerifyingKey};
12+
use alloy_signer_local::LocalSigner;
1313
use internal_error::{InternalError, ResultIntoInternal};
1414

1515
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -31,7 +31,7 @@ impl Secp256k1Signer {
3131
}
3232

3333
pub fn sign_prehash(&self, hash: &B256) -> Result<Secp256k1Signature, InternalError> {
34-
use alloy::signers::SignerSync;
34+
use alloy_signer::SignerSync;
3535

3636
let signature = self.0.sign_hash_sync(hash).int_err()?;
3737

@@ -216,7 +216,7 @@ impl Secp256k1VerifyingKey {
216216
) -> Result<(), InternalError> {
217217
use std::ops::Deref;
218218

219-
use alloy::signers::k256::ecdsa::signature::hazmat::PrehashVerifier;
219+
use alloy_signer::k256::ecdsa::signature::hazmat::PrehashVerifier;
220220

221221
let signature = signature.to_k256().int_err()?;
222222

src/utils/crypto-eip712-utils/tests/tests/test_molecule_onchainlab_fixtures.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
// the Business Source License, use of this software will be governed
88
// by the Apache License, Version 2.0.
99

10-
use alloy::hex;
11-
use alloy::primitives::{b256, keccak256};
10+
use alloy_core::hex;
11+
use alloy_core::primitives::{b256, keccak256};
1212
use crypto_eip712_utils::{Eip712TypedData, Secp256k1Signer};
1313
use pretty_assertions::{assert_eq, assert_matches};
1414
use serde_json::json;

src/utils/crypto-eip712-utils/tests/tests/test_secp256k1.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// the Business Source License, use of this software will be governed
88
// by the Apache License, Version 2.0.
99

10-
use alloy::primitives::b256;
10+
use alloy_core::primitives::b256;
1111
use crypto_eip712_utils::{Secp256k1Signature, Secp256k1Signer, Secp256k1VerifyingKey};
1212
use pretty_assertions::assert_eq;
1313
use serde_json::json;

0 commit comments

Comments
 (0)