Struct common_types::views::TypedTransactionView
source · [−]pub struct TypedTransactionView<'a> { /* private fields */ }
Expand description
View onto transaction rlp. Assumption is this is part of block. Typed Transaction View. It handles raw bytes to search for particular field. EIP1559 tx: 2 | [chainId, nonce, maxPriorityFeePerGas, maxFeePerGas(gasPrice), gasLimit, to, value, data, access_list, senderV, senderR, senderS] Access tx: 1 | [chainId, nonce, gasPrice, gasLimit, to, value, data, access_list, senderV, senderR, senderS] Legacy tx: [nonce, gasPrice, gasLimit, to, value, data, senderV, senderR, senderS]
Implementations
sourceimpl<'a> TypedTransactionView<'a>
impl<'a> TypedTransactionView<'a>
sourcepub fn new(rlp: ViewRlp<'a>) -> TypedTransactionView<'a>
pub fn new(rlp: ViewRlp<'a>) -> TypedTransactionView<'a>
Creates new view onto valid transaction rlp.
Use the view!
macro to create this view in order to capture debugging info.
sourcepub fn transaction_type(&self) -> &TypedTxId
pub fn transaction_type(&self) -> &TypedTxId
Returns reference to transaction type.
sourcepub fn effective_gas_price(&self, block_base_fee: Option<U256>) -> U256
pub fn effective_gas_price(&self, block_base_fee: Option<U256>) -> U256
Get the effective_gas_price field of the transaction.
sourcepub fn effective_priority_gas_price(&self, block_base_fee: Option<U256>) -> U256
pub fn effective_priority_gas_price(&self, block_base_fee: Option<U256>) -> U256
Get the actual priority gas price paid to the miner
pub fn standard_v(&self) -> u8
Auto Trait Implementations
impl<'a> !RefUnwindSafe for TypedTransactionView<'a>
impl<'a> Send for TypedTransactionView<'a>
impl<'a> !Sync for TypedTransactionView<'a>
impl<'a> Unpin for TypedTransactionView<'a>
impl<'a> UnwindSafe for TypedTransactionView<'a>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more