Struct primitives::transaction::SignedTransaction
source · 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
impl SignedTransaction
sourcepub fn new(public: Public, transaction: TransactionWithSignature) -> Self
pub fn new(public: Public, transaction: TransactionWithSignature) -> Self
Try to verify transaction and recover sender.
pub fn new_unsigned(transaction: TransactionWithSignature) -> Self
pub fn set_public(&mut self, public: Public)
pub fn nonce(&self) -> &U256
sourcepub fn is_unsigned(&self) -> bool
pub fn is_unsigned(&self) -> bool
Checks if signature is empty.
pub fn hash(&self) -> H256
pub fn gas(&self) -> &U256
pub fn gas_price(&self) -> &U256
pub fn gas_limit(&self) -> &U256
pub fn storage_limit(&self) -> Option<u64>
pub fn rlp_size(&self) -> usize
pub fn public(&self) -> &Option<Public>
pub fn verify_public(&self, skip: bool) -> Result<bool, Error>
Methods from Deref<Target = TransactionWithSignature>§
sourcepub fn is_unsigned(&self) -> bool
pub fn is_unsigned(&self) -> bool
Checks whether signature is empty.
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.
pub fn check_y_parity(&self) -> Result<(), Error>
pub fn hash(&self) -> H256
sourcepub fn recover_public(&self) -> Result<Public, Error>
pub fn recover_public(&self) -> Result<Public, Error>
Recovers the public key of the sender.
pub fn rlp_size(&self) -> usize
Methods from Deref<Target = Transaction>§
pub fn gas(&self) -> &U256
pub fn gas_price(&self) -> &U256
pub fn max_priority_gas_price(&self) -> &U256
pub fn data(&self) -> &Bytes
pub fn nonce(&self) -> &U256
pub fn action(&self) -> &Action
pub fn value(&self) -> &U256
pub fn chain_id(&self) -> Option<u32>
pub fn storage_limit(&self) -> Option<u64>
pub fn nonce_mut(&mut self) -> &mut U256
pub fn type_id(&self) -> u8
pub fn is_legacy(&self) -> bool
pub fn is_2718(&self) -> bool
pub fn after_1559(&self) -> bool
pub fn access_list(&self) -> Option<&AccessList>
pub fn priority_gas_price(&self, base_price: &U256) -> U256
pub fn effective_gas_price(&self, base_price: &U256) -> U256
pub fn signature_hash(&self) -> H256
pub fn space(&self) -> Space
Trait Implementations§
source§impl Clone for SignedTransaction
impl Clone for SignedTransaction
source§fn clone(&self) -> SignedTransaction
fn clone(&self) -> SignedTransaction
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SignedTransaction
impl Debug for SignedTransaction
source§impl Decodable for SignedTransaction
impl Decodable for SignedTransaction
source§impl DerefMut for SignedTransaction
impl DerefMut for SignedTransaction
source§impl<'de> Deserialize<'de> for SignedTransaction
impl<'de> Deserialize<'de> for SignedTransaction
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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
impl Encodable for SignedTransaction
source§impl From<SignedTransaction> for TransactionWithSignature
impl From<SignedTransaction> for TransactionWithSignature
source§fn from(tx: SignedTransaction) -> Self
fn from(tx: SignedTransaction) -> Self
Converts to this type from the input type.
source§impl MallocSizeOf for SignedTransaction
impl MallocSizeOf for SignedTransaction
source§impl PartialEq for SignedTransaction
impl PartialEq for SignedTransaction
source§fn 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 ==
.source§impl Serialize for SignedTransaction
impl Serialize for SignedTransaction
source§impl Deref for SignedTransaction
impl Deref 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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more