Struct cfx_rpc_eth_types::Transaction
source · 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
impl Transaction
sourcepub fn from_signed(
t: &SignedTransaction,
block_info: (Option<H256>, Option<U256>, Option<U256>),
exec_info: (Option<U64>, Option<H160>)
) -> Transaction
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.
pub fn deployed_contract_address(t: &SignedTransaction) -> Option<H160>
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§fn default() -> Transaction
fn default() -> Transaction
Returns the “default value” for a type. Read more
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 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