pub struct SignedTransaction {
    pub transaction: TransactionWithSignature,
    pub sender: Address,
    pub public: Option<Public>,
}
Expand description

A signed transaction with successfully recovered sender.

Fields§

§transaction: TransactionWithSignature§sender: Address§public: Option<Public>

Implementations§

source§

impl SignedTransaction

source

pub fn new(public: Public, transaction: TransactionWithSignature) -> Self

Try to verify transaction and recover sender.

source

pub fn new_unsigned(transaction: TransactionWithSignature) -> Self

source

pub fn set_public(&mut self, public: Public)

source

pub fn sender(&self) -> AddressWithSpace

Returns transaction sender.

source

pub fn nonce(&self) -> &U256

source

pub fn is_unsigned(&self) -> bool

Checks if signature is empty.

source

pub fn hash(&self) -> H256

source

pub fn gas(&self) -> &U256

source

pub fn gas_price(&self) -> &U256

source

pub fn gas_limit(&self) -> &U256

source

pub fn storage_limit(&self) -> Option<u64>

source

pub fn rlp_size(&self) -> usize

source

pub fn public(&self) -> &Option<Public>

source

pub fn verify_public(&self, skip: bool) -> Result<bool, Error>

Methods from Deref<Target = TransactionWithSignature>§

source

pub fn is_unsigned(&self) -> bool

Checks whether signature is empty.

source

pub fn signature(&self) -> Signature

Construct a signature object from the sig.

source

pub fn check_low_s(&self) -> Result<(), Error>

Checks whether the signature has a low ‘s’ value.

source

pub fn check_y_parity(&self) -> Result<(), Error>

source

pub fn hash(&self) -> H256

source

pub fn recover_public(&self) -> Result<Public, Error>

Recovers the public key of the sender.

source

pub fn rlp_size(&self) -> usize

Methods from Deref<Target = Transaction>§

source

pub fn gas(&self) -> &U256

source

pub fn gas_price(&self) -> &U256

source

pub fn max_priority_gas_price(&self) -> &U256

source

pub fn data(&self) -> &Bytes

source

pub fn nonce(&self) -> &U256

source

pub fn action(&self) -> &Action

source

pub fn value(&self) -> &U256

source

pub fn chain_id(&self) -> Option<u32>

source

pub fn storage_limit(&self) -> Option<u64>

source

pub fn nonce_mut(&mut self) -> &mut U256

source

pub fn type_id(&self) -> u8

source

pub fn is_legacy(&self) -> bool

source

pub fn is_2718(&self) -> bool

source

pub fn after_1559(&self) -> bool

source

pub fn access_list(&self) -> Option<&AccessList>

source

pub fn priority_gas_price(&self, base_price: &U256) -> U256

source

pub fn effective_gas_price(&self, base_price: &U256) -> U256

source

pub fn signature_hash(&self) -> H256

source

pub fn space(&self) -> Space

Trait Implementations§

source§

impl Clone for SignedTransaction

source§

fn clone(&self) -> SignedTransaction

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for SignedTransaction

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Decodable for SignedTransaction

source§

fn decode(rlp: &Rlp<'_>) -> Result<Self, DecoderError>

Decode a value from RLP bytes
source§

impl DerefMut for SignedTransaction

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl<'de> Deserialize<'de> for SignedTransaction

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Encodable for SignedTransaction

source§

fn rlp_append(&self, s: &mut RlpStream)

Append a value to the stream
§

fn rlp_bytes(&self) -> Vec<u8>

Get rlp-encoded bytes for this instance
source§

impl From<SignedTransaction> for TransactionWithSignature

source§

fn from(tx: SignedTransaction) -> Self

Converts to this type from the input type.
source§

impl MallocSizeOf for SignedTransaction

source§

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.
source§

impl PartialEq for SignedTransaction

source§

fn eq(&self, other: &SignedTransaction) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for SignedTransaction

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Deref for SignedTransaction

§

type Target = TransactionWithSignature

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl StructuralPartialEq for SignedTransaction

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,