Documentation

TransactionType
in package

TransactionType defines various types of Ethereum transactions.

Tags
author

DubbaThony

Table of Contents

Cases

ACCESS_LIST
BLOB
DYNAMIC_FEE
LEGACY

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

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
throws
NotSupportedException

If the provided type is not recognized, malformed, or not supported.

Return values
TransactionType

The corresponding enum value.

spawnSuchTransaction()

Instantiates a Transaction object of type based on the transaction type.

public spawnSuchTransaction() : Transaction
Tags
throws
NotSupportedException

If the transaction type is not supported.

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.


        
On this page

Search results