pub struct MempoolTransaction { /* private fields */ }Implementations§
Source§impl MempoolTransaction
impl MempoolTransaction
pub fn new(tx: Transaction, sender: Address) -> Self
pub fn time(&self) -> u128
pub fn sender(&self) -> Address
pub fn transaction(&self) -> &Transaction
Methods from Deref<Target = Transaction>§
Sourcepub fn encode_canonical(&self, buf: &mut dyn BufMut)
pub fn encode_canonical(&self, buf: &mut dyn BufMut)
Encodes a transaction in canonical format
Based on [EIP-2718]
Transactions can be encoded in the following formats:
A) TransactionType || Transaction (Where Transaction type is an 8-bit number between 0 and 0x7f, and Transaction is an rlp encoded transaction of type TransactionType)
B) LegacyTransaction (An rlp encoded LegacyTransaction)
Sourcepub fn encode_canonical_to_vec(&self) -> Vec<u8> ⓘ
pub fn encode_canonical_to_vec(&self) -> Vec<u8> ⓘ
Encodes a transaction in canonical format into a newly created buffer
Based on [EIP-2718]
Transactions can be encoded in the following formats:
A) TransactionType || Transaction (Where Transaction type is an 8-bit number between 0 and 0x7f, and Transaction is an rlp encoded transaction of type TransactionType)
B) LegacyTransaction (An rlp encoded LegacyTransaction)
Sourcepub fn encode_canonical_len(&self) -> usize
pub fn encode_canonical_len(&self) -> usize
Canonical-encoded length without allocating a buffer. Counts the
1-byte type prefix for typed txs (EIP-2718) plus the inner RLP
payload length. Use this when only the size is needed (e.g.
admission-time size caps) to avoid encode_canonical_to_vec().len().
pub fn tx_type(&self) -> TxType
pub fn effective_gas_price(&self, base_fee_per_gas: Option<u64>) -> Option<U256>
pub fn cost_without_base_fee(&self) -> Option<U256>
pub fn fee_token(&self) -> Option<Address>
pub fn sender(&self, crypto: &dyn Crypto) -> Result<Address, CryptoError>
pub fn gas_limit(&self) -> u64
pub fn gas_price(&self) -> U256
pub fn to(&self) -> TxKind
pub fn value(&self) -> U256
pub fn max_priority_fee(&self) -> Option<u64>
pub fn chain_id(&self) -> Option<u64>
pub fn access_list(&self) -> &AccessList
pub fn nonce(&self) -> u64
pub fn data(&self) -> &Bytes
pub fn blob_versioned_hashes(&self) -> Vec<H256>
pub fn max_fee_per_blob_gas(&self) -> Option<U256>
pub fn is_contract_creation(&self) -> bool
pub fn is_privileged(&self) -> bool
pub fn max_fee_per_gas(&self) -> Option<u64>
pub fn hash(&self) -> H256
pub fn gas_tip_cap(&self) -> U256
pub fn gas_fee_cap(&self) -> U256
Trait Implementations§
Source§impl Clone for MempoolTransaction
impl Clone for MempoolTransaction
Source§fn clone(&self) -> MempoolTransaction
fn clone(&self) -> MempoolTransaction
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MempoolTransaction
impl Debug for MempoolTransaction
Source§impl Deref for MempoolTransaction
impl Deref for MempoolTransaction
impl Eq for MempoolTransaction
Source§impl Ord for MempoolTransaction
impl Ord for MempoolTransaction
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for MempoolTransaction
impl PartialEq for MempoolTransaction
Source§fn eq(&self, other: &MempoolTransaction) -> bool
fn eq(&self, other: &MempoolTransaction) -> bool
self and other values to be equal, and is used by ==.Source§impl PartialOrd for MempoolTransaction
impl PartialOrd for MempoolTransaction
Source§impl RLPDecode for MempoolTransaction
impl RLPDecode for MempoolTransaction
fn decode_unfinished(rlp: &[u8]) -> Result<(Self, &[u8]), RLPDecodeError>
fn decode(rlp: &[u8]) -> Result<Self, RLPDecodeError>
Source§impl RLPEncode for MempoolTransaction
impl RLPEncode for MempoolTransaction
impl StructuralPartialEq for MempoolTransaction
Auto Trait Implementations§
impl Freeze for MempoolTransaction
impl RefUnwindSafe for MempoolTransaction
impl Send for MempoolTransaction
impl Sync for MempoolTransaction
impl Unpin for MempoolTransaction
impl UnsafeUnpin for MempoolTransaction
impl UnwindSafe for MempoolTransaction
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.