Struct common_types::transaction::UnverifiedTransaction
source · [−]pub struct UnverifiedTransaction {
pub unsigned: TypedTransaction,
pub signature: SignatureComponents,
pub chain_id: Option<u64>,
pub hash: H256,
}
Expand description
Signed transaction information without verified signature.
Fields
unsigned: TypedTransaction
Plain Transaction.
signature: SignatureComponents
Transaction signature
chain_id: Option<u64>
chain_id recover from signature in legacy transaction. For TypedTransaction it is probably separate field.
hash: H256
Hash of the transaction
Implementations
sourceimpl UnverifiedTransaction
impl UnverifiedTransaction
pub fn rlp_append(&self, s: &mut RlpStream)
pub fn rlp_append_list(s: &mut RlpStream, tx_list: &[UnverifiedTransaction])
pub fn encode(&self) -> Vec<u8>
sourcepub fn compute_hash(self) -> UnverifiedTransaction
pub fn compute_hash(self) -> UnverifiedTransaction
Used to compute hash of created transactions.
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 UnverifiedTransaction
impl Clone for UnverifiedTransaction
sourcefn clone(&self) -> UnverifiedTransaction
fn clone(&self) -> UnverifiedTransaction
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 UnverifiedTransaction
impl Debug for UnverifiedTransaction
sourceimpl Deref for UnverifiedTransaction
impl Deref for UnverifiedTransaction
type Target = TypedTransaction
type Target = TypedTransaction
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 MallocSizeOf for UnverifiedTransaction
impl MallocSizeOf for UnverifiedTransaction
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<UnverifiedTransaction> for UnverifiedTransaction
impl PartialEq<UnverifiedTransaction> for UnverifiedTransaction
sourcefn eq(&self, other: &UnverifiedTransaction) -> bool
fn eq(&self, other: &UnverifiedTransaction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &UnverifiedTransaction) -> bool
fn ne(&self, other: &UnverifiedTransaction) -> bool
This method tests for !=
.
impl Eq for UnverifiedTransaction
impl StructuralEq for UnverifiedTransaction
impl StructuralPartialEq for UnverifiedTransaction
Auto Trait Implementations
impl RefUnwindSafe for UnverifiedTransaction
impl Send for UnverifiedTransaction
impl Sync for UnverifiedTransaction
impl Unpin for UnverifiedTransaction
impl UnwindSafe for UnverifiedTransaction
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