Struct common_types::transaction::SignedTransaction
source · [−]pub struct SignedTransaction { /* private fields */ }
Expand description
A UnverifiedTransaction
with successfully recovered sender
.
Implementations
sourceimpl SignedTransaction
impl SignedTransaction
pub fn new(transaction: UnverifiedTransaction) -> Result<Self, Error>
sourcepub fn public_key(&self) -> Option<Public>
pub fn public_key(&self) -> Option<Public>
Returns a public key of the sender.
sourcepub fn is_unsigned(&self) -> bool
pub fn is_unsigned(&self) -> bool
Checks is signature is empty.
sourcepub fn deconstruct(self) -> (UnverifiedTransaction, Address, Option<Public>)
pub fn deconstruct(self) -> (UnverifiedTransaction, Address, Option<Public>)
Deconstructs this transaction back into UnverifiedTransaction
pub fn rlp_append_list(s: &mut RlpStream, tx_list: &[SignedTransaction])
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 SignedTransaction
impl Clone for SignedTransaction
sourcefn clone(&self) -> SignedTransaction
fn clone(&self) -> SignedTransaction
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 SignedTransaction
impl Debug for SignedTransaction
sourceimpl Deref for SignedTransaction
impl Deref for SignedTransaction
type Target = UnverifiedTransaction
type Target = UnverifiedTransaction
The resulting type after dereferencing.
sourceimpl From<SignedTransaction> for UnverifiedTransaction
impl From<SignedTransaction> for UnverifiedTransaction
sourcefn from(tx: SignedTransaction) -> Self
fn from(tx: SignedTransaction) -> Self
Performs the conversion.
sourceimpl From<SignedTransaction> for PendingTransaction
impl From<SignedTransaction> for PendingTransaction
sourcefn from(t: SignedTransaction) -> Self
fn from(t: SignedTransaction) -> Self
Performs the conversion.
sourceimpl MallocSizeOf for SignedTransaction
impl MallocSizeOf for SignedTransaction
sourcefn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
If T::size_of
is a constant, consider implementing constant_size
as well. Read more
sourcefn constant_size() -> Option<usize>
fn constant_size() -> Option<usize>
Used to optimize MallocSizeOf
implementation for collections
like Vec
and HashMap
to avoid iterating over them unnecessarily.
The Self: Sized
bound is for object safety. Read more
sourceimpl PartialEq<SignedTransaction> for SignedTransaction
impl PartialEq<SignedTransaction> for SignedTransaction
sourcefn eq(&self, other: &SignedTransaction) -> bool
fn eq(&self, other: &SignedTransaction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &SignedTransaction) -> bool
fn ne(&self, other: &SignedTransaction) -> bool
This method tests for !=
.
impl Eq for SignedTransaction
impl StructuralEq for SignedTransaction
impl StructuralPartialEq for SignedTransaction
Auto Trait Implementations
impl RefUnwindSafe for SignedTransaction
impl Send for SignedTransaction
impl Sync for SignedTransaction
impl Unpin for SignedTransaction
impl UnwindSafe for SignedTransaction
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> MallocSizeOfExt for T where
T: MallocSizeOf,
impl<T> MallocSizeOfExt for T where
T: MallocSizeOf,
sourcefn malloc_size_of(&self) -> usize
fn malloc_size_of(&self) -> usize
Method to launch a heapsize measurement with a fresh state. 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