pub struct ValidTransaction {
    pub caller: Option<Address>,
    pub gas_price: Gas,
    pub gas_limit: Gas,
    pub action: TransactionAction,
    pub value: U256,
    pub input: Rc<Vec<u8>>,
    pub nonce: U256,
}
Expand description

Represents an Ethereum transaction.

About SYSTEM transaction

SYSTEM transaction in Ethereum is something that cannot be executed by the user, and is enforced by the blockchain rules. The SYSTEM transaction does not have a caller. When executed in EVM, however, the CALLER opcode would return 0xffffffffffffffffffffffffffffffffffffffff. As a result, when executing a message call or a contract creation, nonce are not changed. A SYSTEM transaction must have gas_price set to zero. Because the transaction reward is always zero, a SYSTEM transaction will also not invoke creation of the beneficiary address if it does not exist before.

Fields

caller: Option<Address>

Caller of this transaction. If caller is None, then this is a SYSTEM transaction.

gas_price: Gas

Gas price of this transaction.

gas_limit: Gas

Gas limit of this transaction.

action: TransactionAction

Transaction action.

value: U256

Value of this transaction.

input: Rc<Vec<u8>>

Data or init associated with this transaction.

nonce: U256

Nonce of the transaction.

Implementations

Create a valid transaction from a block transaction. Caller is always Some.

To address of the transaction.

Intrinsic gas to be paid in prior to this transaction execution.

Convert this transaction into a context. Note that this will change the account state.

When the execution of a transaction begins, this preclaimed value is deducted from the account.

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.