Skip to content

Commit 581d2dc

Browse files
committed
feat: depend on foundry-wallets and nuke much of eth-commons code
1 parent e6f1cd8 commit 581d2dc

12 files changed

Lines changed: 258 additions & 1073 deletions

Cargo.lock

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

Cargo.toml

Lines changed: 7 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ members = [".", "ethx-commons"]
88

99
[dependencies]
1010
alloy-chains = "0.2"
11-
alloy-contract = "2.0.0-rc.0"
12-
alloy-network = "2.0.0-rc.0"
11+
alloy-contract = "2.0.0"
12+
alloy-network = "2.0.0"
1313
alloy-primitives = "1.5.7"
14-
alloy-provider = { version = "2.0.0-rc.0", features = ["reqwest", "ws", "ipc"] }
15-
alloy-rpc-types-eth = "2.0.0-rc.0"
16-
alloy-signer = "2.0.0-rc.0"
14+
alloy-provider = { version = "2.0.0", features = ["reqwest", "ws", "ipc"] }
15+
alloy-rpc-types-eth = "2.0.0"
16+
alloy-signer = "2.0.0"
1717
alloy-sol-types = "1.5.7"
1818
clap = { version = "4", features = ["derive", "env", "unicode", "wrap_help"] }
1919
eyre = "0.6"
@@ -25,29 +25,5 @@ thiserror = "2"
2525
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
2626

2727
[dev-dependencies]
28-
alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
29-
alloy-signer-local = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
30-
31-
[patch.crates-io]
32-
alloy-consensus = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
33-
alloy-contract = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
34-
alloy-eips = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
35-
alloy-ens = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
36-
alloy-genesis = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
37-
alloy-json-rpc = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
38-
alloy-network = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
39-
alloy-network-primitives = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
40-
alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
41-
alloy-pubsub = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
42-
alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
43-
alloy-rpc-types-eth = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
44-
alloy-serde = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
45-
alloy-signer = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
46-
alloy-signer-ledger = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
47-
alloy-signer-local = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
48-
alloy-signer-trezor = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
49-
alloy-transport = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
50-
alloy-transport-http = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
51-
alloy-transport-ipc = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
52-
alloy-transport-ws = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
53-
28+
alloy-node-bindings = "2.0.0"
29+
alloy-signer-local = "2.0.0"

ethx-commons/Cargo.toml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,32 +5,23 @@ edition = "2024"
55

66
[dependencies]
77
alloy-chains = "0.2"
8-
alloy-consensus = "2.0.0-rc.0"
98
alloy-dyn-abi = "1.4.1"
10-
alloy-eips = "2.0.0-rc.0"
11-
alloy-ens = { version = "2.0.0-rc.0", features = ["provider"] }
9+
alloy-eips = "2.0.0"
10+
alloy-ens = { version = "2.0.0", features = ["provider"] }
1211
alloy-json-abi = "1.5.7"
13-
alloy-network = "2.0.0-rc.0"
12+
alloy-network = "2.0.0"
1413
alloy-primitives = "1.5.7"
15-
alloy-provider = { version = "2.0.0-rc.0", features = ["reqwest", "ws", "ipc"] }
14+
alloy-provider = { version = "2.0.0", features = ["reqwest", "ws", "ipc"] }
1615
alloy-rlp = "0.3"
17-
alloy-signer = { version = "2.0.0-rc.0", features = ["eip712"] }
18-
alloy-signer-ledger = { version = "2.0.0-rc.0", features = ["eip712"] }
19-
alloy-signer-local = { version = "2.0.0-rc.0", features = ["mnemonic", "keystore"] }
20-
alloy-signer-trezor = "2.0.0-rc.0"
21-
alloy-sol-types = "1.5.7"
22-
async-trait = "0.1"
2316
clap = { version = "4", features = ["derive", "env", "unicode", "wrap_help"] }
24-
eth-keystore = "0.5.0"
2517
eyre = "0.6"
2618
foundry-block-explorers = "0.22"
27-
rpassword = "7"
19+
foundry-wallets = "0.1"
2820
futures = "0.3"
2921
serde = { version = "1", features = ["derive"] }
3022
serde_json = "1"
31-
thiserror = "2"
3223
tracing = "0.1"
3324

3425
[dev-dependencies]
35-
alloy-node-bindings = { git = "https://github.com/alloy-rs/alloy", rev = "100a3325ac4d624f3eb0bd404125750e76edf8ca" }
26+
alloy-node-bindings = "2.0.0"
3627
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }

ethx-commons/src/error.rs

Lines changed: 0 additions & 69 deletions
This file was deleted.

ethx-commons/src/lib.rs

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,28 @@
1-
//! Shared wallet and Ethereum CLI support types for `ethx`.
1+
//! Shared Ethereum CLI support types for `ethx`.
22
//!
3-
//! This crate mirrors the wallet-facing API shape previously consumed from
4-
//! Foundry so `ethx` can migrate away incrementally while preserving its CLI.
3+
//! Wallet parsing and signer resolution are re-exported from `foundry-wallets`; this crate keeps
4+
//! the remaining `ethx`-specific ABI, RPC/explorer, and transaction option helpers in one place.
55
66
/// ABI and calldata parsing helpers.
77
pub mod abi;
8-
/// Error types for wallet parsing and signer construction.
9-
pub mod error;
108
/// Ethereum CLI option wrappers composed from RPC, explorer, and wallet options.
119
pub mod ethereum;
12-
/// Top-level wallet CLI options and signer resolution helpers.
13-
pub mod opts;
14-
/// Signer abstractions and signer-related helpers.
15-
pub mod signer;
16-
/// Tempo-related compatibility types.
17-
pub mod tempo;
1810
/// Transaction option types used by `ethx`.
1911
pub mod tx;
20-
/// Utility functions for wallet loading and signer creation.
12+
/// Small CLI parsing utilities that are not provided by `foundry-wallets`.
2113
pub mod utils;
22-
/// Raw wallet CLI options such as private keys and mnemonics.
23-
pub mod wallet_raw;
2414

2515
/// ABI and calldata parsing helpers.
2616
pub use abi::parse_function_args;
2717
/// Combined Ethereum CLI options used by `ethx`.
2818
pub use ethereum::{EthereumOpts, EtherscanOpts, RpcOpts};
29-
/// Wallet CLI options and signer resolution entrypoints.
30-
pub use opts::WalletOpts;
19+
/// Tempo access-key configuration compatibility type from `foundry-wallets`.
20+
pub use foundry_wallets::MaybeTempoConfig as TempoAccessKeyConfig;
21+
/// Raw wallet CLI options used by [`WalletOpts`].
22+
pub use foundry_wallets::RawWalletOpts;
23+
/// Wallet CLI options and signer resolution entrypoints provided by `foundry-wallets`.
24+
pub use foundry_wallets::WalletOpts;
3125
/// Signers that require deferred user interaction and the resolved signer type.
32-
pub use signer::{PendingSigner, WalletSigner};
33-
/// Tempo access-key configuration placeholder used for compatibility.
34-
pub use tempo::TempoAccessKeyConfig;
26+
pub use foundry_wallets::{PendingSigner, WalletSigner};
3527
/// Transaction options and authorization-list helpers.
3628
pub use tx::{CliAuthorizationList, TransactionOpts};
37-
/// Raw wallet CLI options used by [`WalletOpts`].
38-
pub use wallet_raw::RawWalletOpts;

0 commit comments

Comments
 (0)