From 4d49fbe125e17c099da49688c547943fdd656b0c Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Sat, 13 Jan 2024 22:49:52 +0100 Subject: [PATCH] chore: rename to node-bindings --- .github/workflows/ci.yml | 2 +- Cargo.toml | 4 ++-- crates/{test-utils => node-bindings}/Cargo.toml | 4 ++-- crates/node-bindings/README.md | 3 +++ crates/{test-utils => node-bindings}/src/anvil.rs | 6 +++--- crates/{test-utils => node-bindings}/src/genesis.rs | 0 crates/{test-utils => node-bindings}/src/geth.rs | 4 ++-- crates/{test-utils => node-bindings}/src/lib.rs | 0 crates/{test-utils => node-bindings}/src/serde_helpers.rs | 0 crates/providers/Cargo.toml | 2 +- crates/providers/src/provider.rs | 2 +- crates/rpc-client/Cargo.toml | 2 +- crates/rpc-client/tests/it/ipc.rs | 2 +- crates/test-utils/README.md | 3 --- 14 files changed, 17 insertions(+), 17 deletions(-) rename crates/{test-utils => node-bindings}/Cargo.toml (83%) create mode 100644 crates/node-bindings/README.md rename crates/{test-utils => node-bindings}/src/anvil.rs (98%) rename crates/{test-utils => node-bindings}/src/genesis.rs (100%) rename crates/{test-utils => node-bindings}/src/geth.rs (99%) rename crates/{test-utils => node-bindings}/src/lib.rs (100%) rename crates/{test-utils => node-bindings}/src/serde_helpers.rs (100%) delete mode 100644 crates/test-utils/README.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98cea9af8eb..5ea86c2dfd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,7 +64,7 @@ jobs: --exclude alloy-signer-aws \ --exclude alloy-signer-ledger \ --exclude alloy-signer-trezor \ - --exclude alloy-test-utils \ + --exclude alloy-node-bindings \ --exclude alloy-transport-ipc feature-checks: diff --git a/Cargo.toml b/Cargo.toml index a8442949dc2..3d29ee2c745 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -21,15 +21,15 @@ alloy-consensus = { version = "0.1.0", path = "crates/consensus" } alloy-eips = { version = "0.1.0", path = "crates/eips" } alloy-json-rpc = { version = "0.1.0", path = "crates/json-rpc" } alloy-network = { version = "0.1.0", path = "crates/network" } +alloy-node-bindings = { version = "0.1.0", path = "crates/node-bindings" } alloy-pubsub = { version = "0.1.0", path = "crates/pubsub" } alloy-rpc-client = { version = "0.1.0", path = "crates/rpc-client" } -alloy-rpc-types = { version = "0.1.0", path = "crates/rpc-types" } alloy-rpc-trace-types = { version = "0.1.0", path = "crates/rpc-trace-types" } +alloy-rpc-types = { version = "0.1.0", path = "crates/rpc-types" } alloy-signer = { version = "0.1.0", path = "crates/signer" } alloy-signer-aws = { version = "0.1.0", path = "crates/signer-aws" } alloy-signer-ledger = { version = "0.1.0", path = "crates/signer-ledger" } alloy-signer-trezor = { version = "0.1.0", path = "crates/signer-trezor" } -alloy-test-utils = { version = "0.1.0", path = "crates/test-utils" } alloy-transport = { version = "0.1.0", path = "crates/transport" } alloy-transport-http = { version = "0.1.0", path = "crates/transport-http" } alloy-transport-ipc = { version = "0.1.0", path = "crates/transport-ipc" } diff --git a/crates/test-utils/Cargo.toml b/crates/node-bindings/Cargo.toml similarity index 83% rename from crates/test-utils/Cargo.toml rename to crates/node-bindings/Cargo.toml index 2593fa1e9ae..fc75eff14e3 100644 --- a/crates/test-utils/Cargo.toml +++ b/crates/node-bindings/Cargo.toml @@ -1,6 +1,6 @@ [package] -name = "alloy-test-utils" -description = "Common Ethereum testing utilities" +name = "alloy-node-bindings" +description = "Ethereum execution-layer client bindings" version.workspace = true edition.workspace = true diff --git a/crates/node-bindings/README.md b/crates/node-bindings/README.md new file mode 100644 index 00000000000..a9195594d68 --- /dev/null +++ b/crates/node-bindings/README.md @@ -0,0 +1,3 @@ +# alloy-node-bindings + +Ethereum execution-layer client bindings. diff --git a/crates/test-utils/src/anvil.rs b/crates/node-bindings/src/anvil.rs similarity index 98% rename from crates/test-utils/src/anvil.rs rename to crates/node-bindings/src/anvil.rs index f56456b01b3..c242d91c8c3 100644 --- a/crates/test-utils/src/anvil.rs +++ b/crates/node-bindings/src/anvil.rs @@ -73,7 +73,7 @@ impl Drop for AnvilInstance { /// # Example /// /// ```no_run -/// use alloy_test_utils::Anvil; +/// use alloy_node_bindings::Anvil; /// /// let port = 8545u16; /// let url = format!("http://localhost:{}", port).to_string(); @@ -106,7 +106,7 @@ impl Anvil { /// # Example /// /// ``` - /// # use alloy_test_utils::Anvil; + /// # use alloy_node_bindings::Anvil; /// fn a() { /// let anvil = Anvil::default().spawn(); /// @@ -122,7 +122,7 @@ impl Anvil { /// # Example /// /// ``` - /// # use alloy_test_utils::Anvil; + /// # use alloy_node_bindings::Anvil; /// fn a() { /// let anvil = Anvil::at("~/.foundry/bin/anvil").spawn(); /// diff --git a/crates/test-utils/src/genesis.rs b/crates/node-bindings/src/genesis.rs similarity index 100% rename from crates/test-utils/src/genesis.rs rename to crates/node-bindings/src/genesis.rs diff --git a/crates/test-utils/src/geth.rs b/crates/node-bindings/src/geth.rs similarity index 99% rename from crates/test-utils/src/geth.rs rename to crates/node-bindings/src/geth.rs index 9be6e6bd8f8..41d802c53bb 100644 --- a/crates/test-utils/src/geth.rs +++ b/crates/node-bindings/src/geth.rs @@ -178,7 +178,7 @@ impl Default for PrivateNetOptions { /// # Example /// /// ```no_run -/// use alloy_test_utils::Geth; +/// use alloy_node_bindings::Geth; /// /// let port = 8545u16; /// let url = format!("http://localhost:{}", port).to_string(); @@ -215,7 +215,7 @@ impl Geth { /// # Example /// /// ``` - /// use alloy_test_utils::Geth; + /// use alloy_node_bindings::Geth; /// # fn a() { /// let geth = Geth::at("../go-ethereum/build/bin/geth").spawn(); /// diff --git a/crates/test-utils/src/lib.rs b/crates/node-bindings/src/lib.rs similarity index 100% rename from crates/test-utils/src/lib.rs rename to crates/node-bindings/src/lib.rs diff --git a/crates/test-utils/src/serde_helpers.rs b/crates/node-bindings/src/serde_helpers.rs similarity index 100% rename from crates/test-utils/src/serde_helpers.rs rename to crates/node-bindings/src/serde_helpers.rs diff --git a/crates/providers/Cargo.toml b/crates/providers/Cargo.toml index f3f5679209a..24aceeaa6f1 100644 --- a/crates/providers/Cargo.toml +++ b/crates/providers/Cargo.toml @@ -26,7 +26,7 @@ reqwest.workspace = true auto_impl = "1.1.0" [dev-dependencies] -alloy-test-utils.workspace = true +alloy-node-bindings.workspace = true tokio = { version = "1.33.0", features = ["macros"] } [features] diff --git a/crates/providers/src/provider.rs b/crates/providers/src/provider.rs index 7aa06402a60..84e671f5317 100644 --- a/crates/providers/src/provider.rs +++ b/crates/providers/src/provider.rs @@ -521,9 +521,9 @@ mod tests { provider::{Provider, TempProvider}, utils, }; + use alloy_node_bindings::Anvil; use alloy_primitives::{address, b256, bytes, U256, U64}; use alloy_rpc_types::{Block, BlockNumberOrTag, Filter}; - use alloy_test_utils::Anvil; #[tokio::test] async fn gets_block_number() { diff --git a/crates/rpc-client/Cargo.toml b/crates/rpc-client/Cargo.toml index 2ef60348b2c..5d62220fd98 100644 --- a/crates/rpc-client/Cargo.toml +++ b/crates/rpc-client/Cargo.toml @@ -35,7 +35,7 @@ alloy-transport-ipc = { workspace = true, optional = true } [dev-dependencies] alloy-primitives.workspace = true -alloy-test-utils.workspace = true +alloy-node-bindings.workspace = true alloy-transport-ipc = { workspace = true, features = ["mock"] } alloy-transport-ws.workspace = true diff --git a/crates/rpc-client/tests/it/ipc.rs b/crates/rpc-client/tests/it/ipc.rs index 28e3f0d4c68..53de95b909b 100644 --- a/crates/rpc-client/tests/it/ipc.rs +++ b/crates/rpc-client/tests/it/ipc.rs @@ -1,7 +1,7 @@ +use alloy_node_bindings::{Geth, GethInstance}; use alloy_primitives::U64; use alloy_pubsub::PubSubFrontend; use alloy_rpc_client::{ClientBuilder, RpcCall, RpcClient}; -use alloy_test_utils::{Geth, GethInstance}; use alloy_transport_ipc::IpcConnect; use std::borrow::Cow; use tempfile::NamedTempFile; diff --git a/crates/test-utils/README.md b/crates/test-utils/README.md deleted file mode 100644 index 00e1c83f4e7..00000000000 --- a/crates/test-utils/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# alloy-test-utils - -Common Ethereum testing utilities.