pub struct Transaction {
Show 25 fields pub transaction_type: Option<U64>, pub hash: H256, pub nonce: U256, pub block_hash: Option<H256>, pub block_number: Option<U256>, pub transaction_index: Option<U256>, pub from: H160, pub to: Option<H160>, pub value: U256, pub gas_price: U256, pub max_fee_per_gas: Option<U256>, pub gas: U256, pub input: Bytes, pub creates: Option<H160>, pub raw: Bytes, pub public_key: Option<H512>, pub chain_id: Option<U64>, pub standard_v: Option<U256>, pub v: U256, pub r: U256, pub s: U256, pub status: Option<U64>, pub access_list: Option<AccessList>, pub max_priority_fee_per_gas: Option<U256>, pub y_parity: Option<U64>,
}
Expand description

Transaction

Fields§

§transaction_type: Option<U64>

transaction type

§hash: H256

Hash

§nonce: U256

Nonce

§block_hash: Option<H256>

Block hash

§block_number: Option<U256>

Block number

§transaction_index: Option<U256>

Transaction Index

§from: H160

Sender

§to: Option<H160>

Recipient

§value: U256

Transfered value

§gas_price: U256

Gas Price

§max_fee_per_gas: Option<U256>

Max fee per gas

§gas: U256

Gas

§input: Bytes

Data

§creates: Option<H160>

Creates contract

§raw: Bytes

Raw transaction data

§public_key: Option<H512>

Public key of the signer.

§chain_id: Option<U64>

The network id of the transaction, if any.

§standard_v: Option<U256>

The standardised V field of the signature (0 or 1). Used by legacy transaction

§v: U256

The standardised V field of the signature.

§r: U256

The R field of the signature.

§s: U256

The S field of the signature.

§status: Option<U64>§access_list: Option<AccessList>

Optional access list

§max_priority_fee_per_gas: Option<U256>

miner bribe

§y_parity: Option<U64>

Implementations§

source§

impl Transaction

source

pub fn from_signed( t: &SignedTransaction, block_info: (Option<H256>, Option<U256>, Option<U256>), exec_info: (Option<U64>, Option<H160>) ) -> Transaction

Convert SignedTransaction into RPC Transaction.

source

pub fn deployed_contract_address(t: &SignedTransaction) -> Option<H160>

Trait Implementations§

source§

impl Clone for Transaction

source§

fn clone(&self) -> Transaction

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 Transaction

source§

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

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

impl Default for Transaction

source§

fn default() -> Transaction

Returns the “default value” for a type. Read more
source§

impl PartialEq for Transaction

source§

fn eq(&self, other: &Transaction) -> 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 Transaction

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 StructuralPartialEq for Transaction

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> Instrument for T

source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> WithSubscriber for T

source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSend for T
where T: Send,

§

impl<T> MaybeSendSync for T