Struct common_types::transaction::LocalizedTransaction
source · [−]pub struct LocalizedTransaction {
pub signed: UnverifiedTransaction,
pub block_number: u64,
pub block_hash: H256,
pub transaction_index: usize,
pub cached_sender: Option<Address>,
}
Expand description
Signed Transaction that is a part of canon blockchain.
Fields
signed: UnverifiedTransaction
Signed part.
block_number: u64
Block number.
block_hash: H256
Block hash.
transaction_index: usize
Transaction index within block.
cached_sender: Option<Address>
Cached sender
Implementations
Methods from Deref<Target = UnverifiedTransaction>
pub fn rlp_append(&self, s: &mut RlpStream)
pub fn encode(&self) -> Vec<u8>
sourcepub fn is_unsigned(&self) -> bool
pub fn is_unsigned(&self) -> bool
Checks if the signature is empty.
sourcepub fn as_unsigned(&self) -> &TypedTransaction
pub fn as_unsigned(&self) -> &TypedTransaction
Reference to unsigned part of this transaction.
sourcepub fn standard_v(&self) -> u8
pub fn standard_v(&self) -> u8
Returns standardized v
value (0, 1 or 4 (invalid))
sourcepub fn legacy_v(&self) -> u64
pub fn legacy_v(&self) -> u64
The legacy v
value that contains signatures v and chain_id for replay protection.
sourcepub fn check_low_s(&self) -> Result<(), Error>
pub fn check_low_s(&self) -> Result<(), Error>
Checks whether the signature has a low ‘s’ value.
sourcepub fn recover_public(&self) -> Result<Public, Error>
pub fn recover_public(&self) -> Result<Public, Error>
Recovers the public key of the sender.
Methods from Deref<Target = TypedTransaction>
pub fn tx_type(&self) -> TypedTxId
sourcepub fn signature_hash(&self, chain_id: Option<u64>) -> H256
pub fn signature_hash(&self, chain_id: Option<u64>) -> H256
The message hash of the transaction.
pub fn tx(&self) -> &Transaction
pub fn access_list(&self) -> Option<&AccessList>
pub fn effective_gas_price(&self, block_base_fee: Option<U256>) -> U256
pub fn max_priority_fee_per_gas(&self) -> U256
pub fn effective_priority_fee(&self, block_base_fee: Option<U256>) -> U256
pub fn has_zero_gas_price(&self) -> bool
Trait Implementations
sourceimpl Clone for LocalizedTransaction
impl Clone for LocalizedTransaction
sourcefn clone(&self) -> LocalizedTransaction
fn clone(&self) -> LocalizedTransaction
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for LocalizedTransaction
impl Debug for LocalizedTransaction
sourceimpl Deref for LocalizedTransaction
impl Deref for LocalizedTransaction
type Target = UnverifiedTransaction
type Target = UnverifiedTransaction
The resulting type after dereferencing.
sourceimpl PartialEq<LocalizedTransaction> for LocalizedTransaction
impl PartialEq<LocalizedTransaction> for LocalizedTransaction
sourcefn eq(&self, other: &LocalizedTransaction) -> bool
fn eq(&self, other: &LocalizedTransaction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &LocalizedTransaction) -> bool
fn ne(&self, other: &LocalizedTransaction) -> bool
This method tests for !=
.
impl Eq for LocalizedTransaction
impl StructuralEq for LocalizedTransaction
impl StructuralPartialEq for LocalizedTransaction
Auto Trait Implementations
impl RefUnwindSafe for LocalizedTransaction
impl Send for LocalizedTransaction
impl Sync for LocalizedTransaction
impl Unpin for LocalizedTransaction
impl UnwindSafe for LocalizedTransaction
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more