Enum primitives::transaction::Transaction
source · pub enum Transaction {
Native(TypedNativeTransaction),
Ethereum(EthereumTransaction),
}
Variants§
Native(TypedNativeTransaction)
Ethereum(EthereumTransaction)
Implementations§
source§impl Transaction
impl 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>
source§impl Transaction
impl Transaction
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
pub fn sign(self, secret: &Secret) -> SignedTransaction
sourcepub fn with_signature(self, sig: Signature) -> TransactionWithSignature
pub fn with_signature(self, sig: Signature) -> TransactionWithSignature
Signs the transaction with signature.
Trait Implementations§
source§impl Clone for Transaction
impl Clone for Transaction
source§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
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 Transaction
impl Debug for Transaction
source§impl Default for Transaction
impl Default for Transaction
source§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
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 From<Eip155Transaction> for Transaction
impl From<Eip155Transaction> for Transaction
source§fn from(tx: Eip155Transaction) -> Self
fn from(tx: Eip155Transaction) -> Self
Converts to this type from the input type.
source§impl From<NativeTransaction> for Transaction
impl From<NativeTransaction> for Transaction
source§fn from(tx: NativeTransaction) -> Self
fn from(tx: NativeTransaction) -> Self
Converts to this type from the input type.
source§impl MallocSizeOf for Transaction
impl MallocSizeOf for Transaction
source§impl PartialEq for Transaction
impl PartialEq for Transaction
source§fn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Transaction
impl Serialize for Transaction
impl Eq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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