Skip to content

Commit

Permalink
chore(sdk): Add adapter type for NodePrimitives::Receipt (#12674)
Browse files Browse the repository at this point in the history
  • Loading branch information
emhane authored Nov 19, 2024
1 parent d49f913 commit 2b21bcf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion crates/primitives-traits/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ pub use size::InMemorySize;

/// Node traits
pub mod node;
pub use node::{FullNodePrimitives, NodePrimitives};
pub use node::{FullNodePrimitives, NodePrimitives, ReceiptTy};

/// Helper trait that requires arbitrary implementation if the feature is enabled.
#[cfg(any(feature = "test-utils", feature = "arbitrary"))]
Expand Down
3 changes: 3 additions & 0 deletions crates/primitives-traits/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,6 @@ where
type TxType = T::TxType;
type Receipt = T::Receipt;
}

/// Helper adapter type for accessing [`NodePrimitives`] receipt type.
pub type ReceiptTy<N> = <N as NodePrimitives>::Receipt;

0 comments on commit 2b21bcf

Please sign in to comment.