diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index c7e02224..546d587e 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -62,16 +62,6 @@ jobs: sed -i 's/\(alloy = { git = "https:\/\/github.com\/alloy-rs\/alloy", rev = "\)[^"]*/\1'"$latest_alloy_commit"'/' \ Cargo.toml - # Temporary patch until https://github.com/alloy-rs/alloy/pull/392 is resolved - sed -i 's/\(alloy-rpc-client = { git = "https:\/\/github.com\/alloy-rs\/alloy", rev = "\)[^"]*/\1'"$latest_alloy_commit"'/' \ - examples/providers/Cargo.toml - sed -i 's/\(alloy-provider = { git = "https:\/\/github.com\/alloy-rs\/alloy", rev = "\)[^"]*/\1'"$latest_alloy_commit"'/' \ - examples/providers/Cargo.toml - sed -i 's/\(alloy-rpc-client = { git = "https:\/\/github.com\/alloy-rs\/alloy", rev = "\)[^"]*/\1'"$latest_alloy_commit"'/' \ - examples/subscriptions/Cargo.toml - sed -i 's/\(alloy-provider = { git = "https:\/\/github.com\/alloy-rs\/alloy", rev = "\)[^"]*/\1'"$latest_alloy_commit"'/' \ - examples/subscriptions/Cargo.toml - # Temporary patch until `patch` section in Alloy is removed sed -i 's/\(alloy-core = { git = "https:\/\/github.com\/alloy-rs\/core", rev = "\)[^"]*/\1'"$latest_alloy_core_commit"'/' \ Cargo.toml diff --git a/Cargo.toml b/Cargo.toml index 95a493a3..f7eff032 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -81,41 +81,26 @@ unnecessary_struct_initialization = "allow" use_self = "allow" [workspace.dependencies] -alloy = { git = "https://github.com/alloy-rs/alloy", rev = "66fa192", features = [ - # "dyn-abi", - # "json-abi", - # "json", - "sol-types", - # "rlp", - # "serde", +alloy = { git = "https://github.com/zerosnacks/alloy", branch = "fix/rpc-client-exports", features = [ "contract", - # "consensus", - # "eips", "network", - # "genesis", "node-bindings", "providers", - "rpc", - # "json-rpc", + "provider-http", + "provider-ipc", + "provider-ws", "rpc-client", - # "rpc-types", + "rpc-client-ipc", + "rpc-client-ws", "rpc-types-eth", - # "rpc-types-engine", "rpc-types-trace", "signers", - # "signer-aws", - # "signer-gcp", "signer-keystore", "signer-ledger", "signer-mnemonic", "signer-trezor", "signer-wallet", "signer-yubihsm", - "transports", - "transport-http", - "transport-ipc", - "transport-ws", - "pubsub", ] } # async diff --git a/examples/providers/Cargo.toml b/examples/providers/Cargo.toml index 2c234790..b30e6fbc 100644 --- a/examples/providers/Cargo.toml +++ b/examples/providers/Cargo.toml @@ -14,15 +14,6 @@ workspace = true [dev-dependencies] alloy.workspace = true -# Temp dependency fix to enable relevant features - Ref: https://github.com/alloy-rs/examples/pull/3#discussion_r1537842062 -alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "66fa192", features = [ - "pubsub", -] } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "66fa192", features = [ - "pubsub", - "ws", -] } - eyre.workspace = true futures-util = "0.3" diff --git a/examples/providers/examples/ipc.rs b/examples/providers/examples/ipc.rs index 6e7d9125..aae5c287 100644 --- a/examples/providers/examples/ipc.rs +++ b/examples/providers/examples/ipc.rs @@ -3,9 +3,9 @@ use alloy::{ network::Ethereum, providers::{Provider, RootProvider}, + rpc::client::RpcClient, transports::ipc::IpcConnect, }; -use alloy_rpc_client::RpcClient; use eyre::Result; #[tokio::main] diff --git a/examples/providers/examples/ws.rs b/examples/providers/examples/ws.rs index 60c5a07e..721f7d73 100644 --- a/examples/providers/examples/ws.rs +++ b/examples/providers/examples/ws.rs @@ -1,10 +1,10 @@ //! Example of using the WS provider to subscribe to new blocks. -use alloy::network::Ethereum; -// Temp Fix -use alloy_provider::{Provider, RootProvider}; -use alloy_rpc_client::{RpcClient, WsConnect}; -// +use alloy::{ + network::Ethereum, + providers::{Provider, RootProvider}, + rpc::client::{RpcClient, WsConnect}, +}; use eyre::Result; use futures_util::StreamExt; diff --git a/examples/providers/examples/ws_with_auth.rs b/examples/providers/examples/ws_with_auth.rs index 116f45e2..436756cd 100644 --- a/examples/providers/examples/ws_with_auth.rs +++ b/examples/providers/examples/ws_with_auth.rs @@ -1,10 +1,11 @@ //! Example of using the WS provider with auth to subscribe to new blocks. -use alloy::{network::Ethereum, transports::Authorization}; -// Temp Fix -use alloy_provider::{Provider, RootProvider}; -use alloy_rpc_client::{RpcClient, WsConnect}; -// +use alloy::{ + network::Ethereum, + providers::{Provider, RootProvider}, + rpc::client::{RpcClient, WsConnect}, + transports::Authorization, +}; use eyre::Result; use futures_util::StreamExt; diff --git a/examples/subscriptions/Cargo.toml b/examples/subscriptions/Cargo.toml index 6cc5f3a8..7b9684b8 100644 --- a/examples/subscriptions/Cargo.toml +++ b/examples/subscriptions/Cargo.toml @@ -14,23 +14,6 @@ workspace = true [dev-dependencies] alloy.workspace = true -# Temp fix for enabling features. Ref: https://github.com/alloy-rs/examples/pull/3/#discussion_r1537842062 -alloy-rpc-client = { git = "https://github.com/alloy-rs/alloy", rev = "66fa192", features = [ - "pubsub", - "ws", -] } -alloy-provider = { git = "https://github.com/alloy-rs/alloy", rev = "66fa192", features = [ - "pubsub", -] } -# alloy-contract.workspace = true -# alloy-network.workspace = true -# alloy-node-bindings.workspace = true -# alloy-provider = { workspace = true, features = ["pubsub", "ws"] } -# alloy-pubsub.workspace = true -# alloy-primitives.workspace = true -# alloy-rpc-client.workspace = true -# alloy-rpc-types.workspace = true -# alloy-sol-types = { workspace = true } eyre.workspace = true futures-util = "0.3" diff --git a/examples/subscriptions/examples/event_multiplexer.rs b/examples/subscriptions/examples/event_multiplexer.rs index 6b1b79cd..a4b92f94 100644 --- a/examples/subscriptions/examples/event_multiplexer.rs +++ b/examples/subscriptions/examples/event_multiplexer.rs @@ -1,8 +1,14 @@ //! Example of multiplexing the watching of event logs. -use alloy::{network::Ethereum, node_bindings::Anvil, primitives::I256, sol, sol_types::SolEvent}; -use alloy_provider::RootProvider; -use alloy_rpc_client::{RpcClient, WsConnect}; +use alloy::{ + network::Ethereum, + node_bindings::Anvil, + primitives::I256, + providers::RootProvider, + rpc::client::{RpcClient, WsConnect}, + sol, + sol_types::SolEvent, +}; use eyre::Result; use futures_util::StreamExt; use std::str::FromStr; diff --git a/examples/subscriptions/examples/subscribe_blocks.rs b/examples/subscriptions/examples/subscribe_blocks.rs index 613df443..3c2d4d45 100644 --- a/examples/subscriptions/examples/subscribe_blocks.rs +++ b/examples/subscriptions/examples/subscribe_blocks.rs @@ -1,8 +1,11 @@ //! Example of subscribing to blocks and watching block headers by polling. -use alloy::{network::Ethereum, node_bindings::Anvil}; -use alloy_provider::{Provider, RootProvider}; -use alloy_rpc_client::RpcClient; +use alloy::{ + network::Ethereum, + node_bindings::Anvil, + providers::{Provider, RootProvider}, + rpc::client::{RpcClient, WsConnect}, +}; use eyre::Result; use futures_util::{stream, StreamExt}; @@ -13,7 +16,7 @@ async fn main() -> Result<()> { let anvil = Anvil::new().block_time(1).try_spawn()?; // Create a provider. - let ws = alloy_rpc_client::WsConnect::new(anvil.ws_endpoint()); + let ws = WsConnect::new(anvil.ws_endpoint()); let provider = RootProvider::::new(RpcClient::connect_pubsub(ws).await?); // Subscribe to blocks. diff --git a/examples/subscriptions/examples/watch_contract_event.rs b/examples/subscriptions/examples/watch_contract_event.rs index 49e93863..63a0be21 100644 --- a/examples/subscriptions/examples/watch_contract_event.rs +++ b/examples/subscriptions/examples/watch_contract_event.rs @@ -1,8 +1,12 @@ //! Example of watching contract events. -use alloy::{network::Ethereum, node_bindings::Anvil, sol}; -use alloy_provider::RootProvider; -use alloy_rpc_client::RpcClient; +use alloy::{ + network::Ethereum, + node_bindings::Anvil, + providers::RootProvider, + rpc::client::{RpcClient, WsConnect}, + sol, +}; use eyre::Result; use futures_util::StreamExt; @@ -37,7 +41,7 @@ async fn main() -> Result<()> { // Create a WebSocket provider. let ws_rpc_url = anvil.ws_endpoint(); - let ws = alloy_rpc_client::WsConnect::new(ws_rpc_url); + let ws = WsConnect::new(ws_rpc_url); let provider = RootProvider::::new(RpcClient::connect_pubsub(ws).await?); // Deploy the `Counter` contract.