Struct common_types::transaction::PendingTransaction
source · [−]pub struct PendingTransaction {
pub transaction: SignedTransaction,
pub condition: Option<Condition>,
}
Expand description
Queued transaction with additional information.
Fields
transaction: SignedTransaction
Signed transaction data.
condition: Option<Condition>
To be activated at this condition. None
for immediately.
Implementations
sourceimpl PendingTransaction
impl PendingTransaction
sourcepub fn new(signed: SignedTransaction, condition: Option<Condition>) -> Self
pub fn new(signed: SignedTransaction, condition: Option<Condition>) -> Self
Create a new pending transaction from signed transaction.
Methods from Deref<Target = SignedTransaction>
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.
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 PendingTransaction
impl Clone for PendingTransaction
sourcefn clone(&self) -> PendingTransaction
fn clone(&self) -> PendingTransaction
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 PendingTransaction
impl Debug for PendingTransaction
sourceimpl Deref for PendingTransaction
impl Deref for PendingTransaction
type Target = SignedTransaction
type Target = SignedTransaction
The resulting type after dereferencing.
sourcefn deref(&self) -> &SignedTransaction
fn deref(&self) -> &SignedTransaction
Dereferences the value.
sourceimpl From<SignedTransaction> for PendingTransaction
impl From<SignedTransaction> for PendingTransaction
sourcefn from(t: SignedTransaction) -> Self
fn from(t: SignedTransaction) -> Self
Performs the conversion.
sourceimpl PartialEq<PendingTransaction> for PendingTransaction
impl PartialEq<PendingTransaction> for PendingTransaction
sourcefn eq(&self, other: &PendingTransaction) -> bool
fn eq(&self, other: &PendingTransaction) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &PendingTransaction) -> bool
fn ne(&self, other: &PendingTransaction) -> bool
This method tests for !=
.
impl Eq for PendingTransaction
impl StructuralEq for PendingTransaction
impl StructuralPartialEq for PendingTransaction
Auto Trait Implementations
impl RefUnwindSafe for PendingTransaction
impl Send for PendingTransaction
impl Sync for PendingTransaction
impl Unpin for PendingTransaction
impl UnwindSafe for PendingTransaction
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