From 3df189ba037ee648adc46cc0c63a1a1441ecdde1 Mon Sep 17 00:00:00 2001 From: refcell Date: Mon, 2 Sep 2024 09:28:52 -0400 Subject: [PATCH] feat(ser): trait abstractions --- Cargo.lock | 12 ++++++++++++ Cargo.toml | 2 ++ crates/ser/Cargo.toml | 1 + crates/ser/src/traits/mod.rs | 6 ++++++ 4 files changed, 21 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index 209379f..b327baf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5702,6 +5702,17 @@ dependencies = [ "serde", ] +[[package]] +name = "op-alloy-rpc-jsonrpsee" +version = "0.4.0" +source = "git+https://github.com/alloy-rs/op-alloy?branch=main#20eb16233c00087827f70d6b4a42afb79dc39da9" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "jsonrpsee", + "op-alloy-rpc-types", +] + [[package]] name = "op-alloy-rpc-types" version = "0.4.0" @@ -9632,6 +9643,7 @@ dependencies = [ "kona-derive", "op-alloy-genesis 0.4.0", "op-alloy-protocol 0.4.0", + "op-alloy-rpc-jsonrpsee", "op-alloy-rpc-types", "rand", "tracing", diff --git a/Cargo.toml b/Cargo.toml index 3c5a4c7..3e6be73 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,6 +29,7 @@ op-alloy-protocol = { git = "https://github.com/alloy-rs/op-alloy", branch = "ma op-alloy-genesis = { git = "https://github.com/alloy-rs/op-alloy", branch = "main" } op-alloy-rpc-types = { git = "https://github.com/alloy-rs/op-alloy", branch = "main" } op-alloy-rpc-types-engine = { git = "https://github.com/alloy-rs/op-alloy", branch = "main" } +op-alloy-rpc-jsonrpsee = { git = "https://github.com/alloy-rs/op-alloy", branch = "main" } [workspace.dependencies] # Workspace @@ -68,6 +69,7 @@ op-alloy-protocol = { version = "0.4.0", default-features = false } op-alloy-genesis = { version = "0.4.0", default-features = false } op-alloy-rpc-types = { version = "0.4.0", default-features = false } op-alloy-rpc-types-engine = { version = "0.4.0", default-features = false } +op-alloy-rpc-jsonrpsee = { version = "0.4.0", features = ["client"] } # Tokio tokio = { version = "1.21", default-features = false } diff --git a/crates/ser/Cargo.toml b/crates/ser/Cargo.toml index fb9c645..0e2fd79 100644 --- a/crates/ser/Cargo.toml +++ b/crates/ser/Cargo.toml @@ -19,6 +19,7 @@ alloy-rlp = { workspace = true, features = ["derive"] } op-alloy-rpc-types.workspace = true op-alloy-protocol.workspace = true op-alloy-genesis.workspace = true +op-alloy-rpc-jsonrpsee.workspace = true # Misc rand.workspace = true diff --git a/crates/ser/src/traits/mod.rs b/crates/ser/src/traits/mod.rs index c9b6db5..5fe1d6c 100644 --- a/crates/ser/src/traits/mod.rs +++ b/crates/ser/src/traits/mod.rs @@ -2,3 +2,9 @@ pub mod compressor; pub use compressor::Compressor; + +// Re-export op-alloy-rpc-jsonrpsee crates +pub use op_alloy_rpc_jsonrpsee::traits::{ + OpAdminApiClient, OpAdminApiServer, OpP2PApiClient, OpP2PApiServer, RollupNodeClient, + RollupNodeServer, +};