Struct reth_node_core::rpc::types::Transaction
pub struct Transaction {Show 20 fields
pub hash: FixedBytes<32>,
pub nonce: u64,
pub block_hash: Option<FixedBytes<32>>,
pub block_number: Option<u64>,
pub transaction_index: Option<u64>,
pub from: Address,
pub to: Option<Address>,
pub value: Uint<256, 4>,
pub gas_price: Option<u128>,
pub gas: u128,
pub max_fee_per_gas: Option<u128>,
pub max_priority_fee_per_gas: Option<u128>,
pub max_fee_per_blob_gas: Option<u128>,
pub input: Bytes,
pub signature: Option<Signature>,
pub chain_id: Option<u64>,
pub blob_versioned_hashes: Option<Vec<FixedBytes<32>>>,
pub access_list: Option<AccessList>,
pub transaction_type: Option<u8>,
pub authorization_list: Option<Vec<SignedAuthorization>>,
}
Expand description
Transaction object used in RPC
Fields§
§hash: FixedBytes<32>
Hash
nonce: u64
Nonce
block_hash: Option<FixedBytes<32>>
Block hash
block_number: Option<u64>
Block number
transaction_index: Option<u64>
Transaction Index
from: Address
Sender
to: Option<Address>
Recipient
value: Uint<256, 4>
Transferred value
gas_price: Option<u128>
Gas Price
gas: u128
Gas amount
max_fee_per_gas: Option<u128>
Max BaseFeePerGas the user is willing to pay.
max_priority_fee_per_gas: Option<u128>
The miner’s tip.
max_fee_per_blob_gas: Option<u128>
Configured max fee per blob gas for eip-4844 transactions
input: Bytes
Data
signature: Option<Signature>
All flattened fields of the transaction signature.
Note: this is an option so special transaction types without a signature (e.g. https://github.com/ethereum-optimism/optimism/blob/0bf643c4147b43cd6f25a759d331ef3a2a61a2a3/specs/deposits.md#the-deposited-transaction-type) can be supported.
chain_id: Option<u64>
The chain id of the transaction, if any.
blob_versioned_hashes: Option<Vec<FixedBytes<32>>>
Contains the blob hashes for eip-4844 transactions.
access_list: Option<AccessList>
EIP2930
Pre-pay to warm storage access.
transaction_type: Option<u8>
EIP2718
Transaction type, Some(4) for EIP-7702 transaction, Some(3) for EIP-4844 transaction, Some(2) for EIP-1559 transaction, Some(1) for AccessList transaction, None or Some(0) for Legacy
The signed authorization list is a list of tuples that store the address to code which the signer desires to execute in the context of their EOA and their signature.
Implementations§
§impl Transaction
impl Transaction
pub const fn is_legacy_gas(&self) -> bool
pub const fn is_legacy_gas(&self) -> bool
Returns true if the transaction is a legacy or 2930 transaction.
pub fn into_request(self) -> TransactionRequest
pub fn into_request(self) -> TransactionRequest
Converts Transaction into TransactionRequest.
During this conversion data for TransactionRequest::sidecar is not populated as it is not part of Transaction.
Trait Implementations§
§impl<'arbitrary> Arbitrary<'arbitrary> for Transaction
impl<'arbitrary> Arbitrary<'arbitrary> for Transaction
§fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Transaction, Error>
fn arbitrary(u: &mut Unstructured<'arbitrary>) -> Result<Transaction, Error>
Self
from the given unstructured data. Read more§fn arbitrary_take_rest(
u: Unstructured<'arbitrary>,
) -> Result<Transaction, Error>
fn arbitrary_take_rest( u: Unstructured<'arbitrary>, ) -> Result<Transaction, Error>
Self
from the entirety of the given
unstructured data. Read more§impl Clone for Transaction
impl Clone for Transaction
§fn clone(&self) -> Transaction
fn clone(&self) -> Transaction
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more§impl Debug for Transaction
impl Debug for Transaction
§impl Default for Transaction
impl Default for Transaction
§fn default() -> Transaction
fn default() -> Transaction
§impl<'de> Deserialize<'de> for Transaction
impl<'de> Deserialize<'de> for Transaction
§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Transaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Transaction, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
§impl From<&Transaction> for TransactionInfo
impl From<&Transaction> for TransactionInfo
§fn from(tx: &Transaction) -> TransactionInfo
fn from(tx: &Transaction) -> TransactionInfo
§impl From<Transaction> for TransactionRequest
impl From<Transaction> for TransactionRequest
§fn from(tx: Transaction) -> TransactionRequest
fn from(tx: Transaction) -> TransactionRequest
§impl PartialEq for Transaction
impl PartialEq for Transaction
§impl Serialize for Transaction
impl Serialize for Transaction
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
§impl TransactionResponse for Transaction
impl TransactionResponse for Transaction
§impl TryFrom<Transaction> for Signed<TxEip1559>
impl TryFrom<Transaction> for Signed<TxEip1559>
§type Error = ConversionError
type Error = ConversionError
§fn try_from(
tx: Transaction,
) -> Result<Signed<TxEip1559>, <Signed<TxEip1559> as TryFrom<Transaction>>::Error>
fn try_from( tx: Transaction, ) -> Result<Signed<TxEip1559>, <Signed<TxEip1559> as TryFrom<Transaction>>::Error>
§impl TryFrom<Transaction> for Signed<TxEip2930>
impl TryFrom<Transaction> for Signed<TxEip2930>
§type Error = ConversionError
type Error = ConversionError
§fn try_from(
tx: Transaction,
) -> Result<Signed<TxEip2930>, <Signed<TxEip2930> as TryFrom<Transaction>>::Error>
fn try_from( tx: Transaction, ) -> Result<Signed<TxEip2930>, <Signed<TxEip2930> as TryFrom<Transaction>>::Error>
§impl TryFrom<Transaction> for Signed<TxEip4844>
impl TryFrom<Transaction> for Signed<TxEip4844>
§type Error = ConversionError
type Error = ConversionError
§fn try_from(
tx: Transaction,
) -> Result<Signed<TxEip4844>, <Signed<TxEip4844> as TryFrom<Transaction>>::Error>
fn try_from( tx: Transaction, ) -> Result<Signed<TxEip4844>, <Signed<TxEip4844> as TryFrom<Transaction>>::Error>
§impl TryFrom<Transaction> for Signed<TxEip4844Variant>
impl TryFrom<Transaction> for Signed<TxEip4844Variant>
§type Error = ConversionError
type Error = ConversionError
§fn try_from(
tx: Transaction,
) -> Result<Signed<TxEip4844Variant>, <Signed<TxEip4844Variant> as TryFrom<Transaction>>::Error>
fn try_from( tx: Transaction, ) -> Result<Signed<TxEip4844Variant>, <Signed<TxEip4844Variant> as TryFrom<Transaction>>::Error>
§impl TryFrom<Transaction> for Signed<TxEip7702>
impl TryFrom<Transaction> for Signed<TxEip7702>
§type Error = ConversionError
type Error = ConversionError
§fn try_from(
tx: Transaction,
) -> Result<Signed<TxEip7702>, <Signed<TxEip7702> as TryFrom<Transaction>>::Error>
fn try_from( tx: Transaction, ) -> Result<Signed<TxEip7702>, <Signed<TxEip7702> as TryFrom<Transaction>>::Error>
§impl TryFrom<Transaction> for Signed<TxLegacy>
impl TryFrom<Transaction> for Signed<TxLegacy>
§type Error = ConversionError
type Error = ConversionError
§fn try_from(
tx: Transaction,
) -> Result<Signed<TxLegacy>, <Signed<TxLegacy> as TryFrom<Transaction>>::Error>
fn try_from( tx: Transaction, ) -> Result<Signed<TxLegacy>, <Signed<TxLegacy> as TryFrom<Transaction>>::Error>
§impl TryFrom<Transaction> for TxEnvelope
impl TryFrom<Transaction> for TxEnvelope
§type Error = ConversionError
type Error = ConversionError
§fn try_from(
tx: Transaction,
) -> Result<TxEnvelope, <TxEnvelope as TryFrom<Transaction>>::Error>
fn try_from( tx: Transaction, ) -> Result<TxEnvelope, <TxEnvelope as TryFrom<Transaction>>::Error>
impl Eq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl !Freeze for Transaction
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘwhere
S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ
impl<A> ArbInterop for A
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> MaybeDebug for Twhere
T: Debug,
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSendSync for T
impl<T> NippyJarHeader for T
impl<T> RpcObject for Twhere
T: RpcParam + RpcReturn,
impl<T> RpcParam for T
impl<T> RpcReturn for T
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 560 bytes