feat(rpc): add rpc crates

This commit is contained in:
Matthias Seitz
2022-09-30 20:16:21 +02:00
parent 6ff7cf5a74
commit 2717dd643a
15 changed files with 899 additions and 7 deletions

View File

@ -0,0 +1,18 @@
[package]
name = "reth-rpc-types"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foundry-rs/reth"
readme = "README.md"
description = """
Reth RPC types
"""
[dependencies]
# ethereum
# misc
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"

View File

@ -0,0 +1,10 @@
#![warn(missing_debug_implementations, missing_docs, unreachable_pub, unused_crate_dependencies)]
#![deny(unused_must_use, rust_2018_idioms)]
#![doc(test(
no_crate_inject,
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
))]
//! Reth RPC type definitions
mod eth;

21
crates/rpc-api/Cargo.toml Normal file
View File

@ -0,0 +1,21 @@
[package]
name = "reth-rpc-api"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foundry-rs/reth"
readme = "README.md"
description = """
Reth RPC interfaces
"""
[dependencies]
# reth
reth-primitives = { path = "../primitives" }
reth-rpc-types = { path = "../rpc-types" }
# misc
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"
jsonrpsee = { version = "0.15", features = ["server", "macros"] }

View File

View File

15
crates/rpc-api/src/lib.rs Normal file
View File

@ -0,0 +1,15 @@
#![warn(missing_debug_implementations, missing_docs, unreachable_pub, unused_crate_dependencies)]
#![deny(unused_must_use, rust_2018_idioms)]
#![doc(test(
no_crate_inject,
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
))]
//! Reth RPC interface definitions
//!
//! Provides all RPC interfaces.
mod eth;
mod eth_pubsub;
mod net;
mod web3;

View File

View File

View File

@ -0,0 +1,18 @@
[package]
name = "reth-rpc-types"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foundry-rs/reth"
readme = "README.md"
description = """
Reth RPC types
"""
[dependencies]
# reth
reth-primitives = { path = "../primitives" }
# misc
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"

View File

@ -0,0 +1 @@
//! Ethereum related types

View File

@ -0,0 +1,12 @@
#![warn(missing_debug_implementations, missing_docs, unreachable_pub, unused_crate_dependencies)]
#![deny(unused_must_use, rust_2018_idioms)]
#![doc(test(
no_crate_inject,
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
))]
//! Reth RPC type definitions
//!
//! Provides all relevant types for the various RPC endpoints, grouped by namespace.
mod eth;

20
crates/rpc/Cargo.toml Normal file
View File

@ -0,0 +1,20 @@
[package]
name = "reth-rpc"
version = "0.1.0"
edition = "2021"
license = "MIT OR Apache-2.0"
repository = "https://github.com/foundry-rs/reth"
readme = "README.md"
description = """
Reth RPC implementation
"""
[dependencies]
# reth
reth-primitives = { path = "../primitives" }
reth-rpc-api = { path = "../rpc-api" }
reth-rpc-types = { path = "../rpc-types" }
# misc
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
thiserror = "1.0"

10
crates/rpc/src/lib.rs Normal file
View File

@ -0,0 +1,10 @@
#![warn(missing_debug_implementations, missing_docs, unreachable_pub, unused_crate_dependencies)]
#![deny(unused_must_use, rust_2018_idioms)]
#![doc(test(
no_crate_inject,
attr(deny(warnings, rust_2018_idioms), allow(dead_code, unused_variables))
))]
//! Reth RPC implementation
//!
//! Provides the implementation of all RPC interfaces