Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(primitives): add additional common aliases #654

Merged
merged 1 commit into from
Jun 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add additional aliases
  • Loading branch information
zerosnacks committed Jun 10, 2024
commit 4d0a840edcb8208c51facb7043369616ebd9ed08
7 changes: 7 additions & 0 deletions crates/primitives/src/aliases.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ pub type BlockHash = B256;
/// A block number.
pub type BlockNumber = u64;

/// A block timestamp.
pub type BlockTimestamp = u64;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unsure if we should add this w/o also using it, so maybe a separate pr?

Copy link
Member Author

@zerosnacks zerosnacks Jun 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would update alloy-rs/alloy#859 to include it so it would be used there

Same for TxNonce


/// A transaction hash is a keccak hash of an RLP encoded signed transaction.
#[doc(alias = "TransactionHash")]
pub type TxHash = B256;
Expand All @@ -73,6 +76,10 @@ pub type TxHash = B256;
#[doc(alias = "TransactionNumber")]
pub type TxNumber = u64;

/// The nonce of a transaction.
#[doc(alias = "TransactionNonce")]
pub type TxNonce = u64;

/// The index of transaction in a block.
#[doc(alias = "TransactionIndex")]
pub type TxIndex = u64;
Expand Down