Skip to content

Commit

Permalink
add docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse committed Aug 9, 2023
1 parent 081f5f9 commit 332bd3c
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 4 deletions.
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crates/rpc/rpc-types-compat/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true

description = """
Compatibility layer for reth-primitives and ethereum RPC types
"""

[dependencies]
reth-primitives.workspace = true
reth-rpc-types.workspace = true
serde = { workspace = true, features = ["derive"] }
reth-rlp.workspace = true
2 changes: 2 additions & 0 deletions crates/rpc/rpc-types-compat/src/block.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Compatibility functions for rpc `Block` type.

use crate::transaction::from_recovered_with_block_context;
use reth_primitives::{Block as PrimitiveBlock, Header as PrimitiveHeader, H256, U256};
use reth_rlp::Encodable;
Expand Down
19 changes: 18 additions & 1 deletion crates/rpc/rpc-types-compat/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
#![doc(
html_logo_url = "https://raw.githubusercontent.com/paradigmxyz/reth/main/assets/reth-docs.png",
html_favicon_url = "https://avatars0.githubusercontent.com/u/97369466?s=256",
issue_tracker_base_url = "https://github.com/paradigmxzy/reth/issues/"
)]
#![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 compatibility and utils for RPC types
//!
//! This crate various helper functions to convert between reth primitive types and rpc types.

pub mod block;
pub mod transaction;
pub use block::*;
pub mod transaction;
pub use transaction::*;
2 changes: 2 additions & 0 deletions crates/rpc/rpc-types-compat/src/transaction/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! Compatibility functions for rpc `Transaction` type.

use reth_primitives::{
AccessListItem, BlockNumber, Transaction as PrimitiveTransaction,
TransactionKind as PrimitiveTransactionKind, TransactionSignedEcRecovered, TxType, H256, U128,
Expand Down

0 comments on commit 332bd3c

Please sign in to comment.