Transaction

Type Alias Transaction 

Source
pub type Transaction = TxEip1559;

Aliased Type§

pub struct Transaction {
    pub chain_id: u64,
    pub nonce: u64,
    pub gas_limit: u64,
    pub max_fee_per_gas: u128,
    pub max_priority_fee_per_gas: u128,
    pub to: TxKind,
    pub value: Uint<256, 4>,
    pub access_list: AccessList,
    pub input: Bytes,
}

Fields§

§chain_id: u64

EIP-155: Simple replay attack protection

§nonce: u64

A scalar value equal to the number of transactions sent by the sender; formally Tn.

§gas_limit: u64

A scalar value equal to the maximum amount of gas that should be used in executing this transaction. This is paid up-front, before any computation is done and may not be increased later; formally Tg.

§max_fee_per_gas: u128

A scalar value equal to the maximum amount of gas that should be used in executing this transaction. This is paid up-front, before any computation is done and may not be increased later; formally Tg.

As ethereum circulation is around 120mil eth as of 2022 that is around 120000000000000000000000000 wei we are safe to use u128 as its max number is: 340282366920938463463374607431768211455

This is also known as GasFeeCap

§max_priority_fee_per_gas: u128

Max Priority fee that transaction is paying

As ethereum circulation is around 120mil eth as of 2022 that is around 120000000000000000000000000 wei we are safe to use u128 as its max number is: 340282366920938463463374607431768211455

This is also known as GasTipCap

§to: TxKind

The 160-bit address of the message call’s recipient or, for a contract creation transaction, ∅, used here to denote the only member of B0 ; formally Tt.

§value: Uint<256, 4>

A scalar value equal to the number of Wei to be transferred to the message call’s recipient or, in the case of contract creation, as an endowment to the newly created account; formally Tv.

§access_list: AccessList

The accessList specifies a list of addresses and storage keys; these addresses and storage keys are added into the accessed_addresses and accessed_storage_keys global sets (introduced in EIP-2929). A gas cost is charged, though at a discount relative to the cost of accessing outside the list.

§input: Bytes

Input has two uses depending if to field is Create or Call. pub init: An unlimited size byte array specifying the EVM-code for the account initialisation procedure CREATE, data: An unlimited size byte array specifying the input data of the message call, formally Td.