mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat: add has eip7702 transactions (#9996)
This commit is contained in:
@ -133,6 +133,12 @@ impl Block {
|
||||
self.body.iter().any(|tx| tx.is_eip4844())
|
||||
}
|
||||
|
||||
/// Returns whether or not the block contains any EIP-7702 transactions.
|
||||
#[inline]
|
||||
pub fn has_eip7702_transactions(&self) -> bool {
|
||||
self.body.iter().any(|tx| tx.is_eip7702())
|
||||
}
|
||||
|
||||
/// Returns an iterator over all blob transactions of the block
|
||||
#[inline]
|
||||
pub fn blob_transactions_iter(&self) -> impl Iterator<Item = &TransactionSigned> + '_ {
|
||||
@ -439,6 +445,12 @@ impl SealedBlock {
|
||||
self.body.iter().any(|tx| tx.is_eip4844())
|
||||
}
|
||||
|
||||
/// Returns whether or not the block contains any eip-7702 transactions.
|
||||
#[inline]
|
||||
pub fn has_eip7702_transactions(&self) -> bool {
|
||||
self.body.iter().any(|tx| tx.is_eip7702())
|
||||
}
|
||||
|
||||
/// Ensures that the transaction root in the block header is valid.
|
||||
///
|
||||
/// The transaction root is the Keccak 256-bit hash of the root node of the trie structure
|
||||
|
||||
Reference in New Issue
Block a user