TransactionType
in package
TransactionType defines various types of Ethereum transactions.
Tags
Table of Contents
Cases
Methods
- numericToEnum() : TransactionType
- Converts a numeric representation of a transaction type, commonly found as first entry in RLP for non-legacy transaction types, to its corresponding enum value. For example, it can be used for decoding transaction after reading the RPL - for selecting transaction type object.
- spawnSuchTransaction() : Transaction
- Instantiates a Transaction object of type based on the transaction type.
- toInt() : int
- Returns an int representing the transaction type.
- toTypeByte() : string
- Returns a byte representing the transaction type commonly found in for example RLP for modern transactions.
Cases
LEGACY
ACCESS_LIST
DYNAMIC_FEE
BLOB
Methods
numericToEnum()
Converts a numeric representation of a transaction type, commonly found as first entry in RLP for non-legacy transaction types, to its corresponding enum value. For example, it can be used for decoding transaction after reading the RPL - for selecting transaction type object.
public
static numericToEnum(string|int $type) : TransactionType
Parameters
- $type : string|int
-
The numeric representation, it can be integer or hex string, with or without 0x prefix or lpad 2
Tags
Return values
TransactionType —The corresponding enum value.
spawnSuchTransaction()
Instantiates a Transaction object of type based on the transaction type.
public
spawnSuchTransaction() : Transaction
Tags
Return values
Transaction —Concrete object of abstract Transaction.
toInt()
Returns an int representing the transaction type.
public
toInt() : int
Return values
int —The int.
toTypeByte()
Returns a byte representing the transaction type commonly found in for example RLP for modern transactions.
public
toTypeByte() : string
Return values
string —The byte.