Ether Binder
Set of utilities for interacting with Ethereum and it's smart contracts with PHP, with generating ABI bindings and Ethereum-related types
Loading...
Searching...
No Matches
M8B\EtherBinder\Common\Block Class Reference

Public Member Functions

 isEIP1559 ()
 
 isEIP4844 ()
 

Static Public Member Functions

static fromRPCArr (array $rpcArr)
 

Public Attributes

int $number
 
Hash $hash
 
Hash $parentHash
 
BlockNonce $nonce
 
Hash $sha3Uncles
 
Bloom $logsBloom
 
Hash $transactionsRoot
 
Hash $stateRoot
 
Hash $receiptsRoot
 
Hash $parentBeaconBlockRoot
 
Address $miner
 
OOGmp $difficulty
 
OOGmp $totalDifficulty
 
string $extraData
 
int $size
 
OOGMP $baseFeePerGas
 
int $gasLimit
 
int $gasUsed
 
int $blobGasUsed
 
int $excessBlobGas
 
int $timestamp
 
array $transactions
 
array $uncles
 
array $validatorWithdrawals
 
Hash $validatorWithdrawalsRoot
 

Detailed Description

Block is a container for Ethereum block and contains various attributes related to it.

Author
DubbaThony

Member Function Documentation

◆ fromRPCArr()

static M8B\EtherBinder\Common\Block::fromRPCArr ( array $rpcArr)
static

Constructs a Block object from an array received through RPC.

Parameters
array$rpcArrThe array containing block data.
Returns
static The Block object.
Exceptions
BadAddressChecksumException
InvalidHexException
InvalidHexLengthException
EthBinderLogicException
HexBlobNotEvenException

◆ isEIP1559()

M8B\EtherBinder\Common\Block::isEIP1559 ( )

Checks if the block looks like coming from EIP-1559 enabled chain by looking if base fee is defined.

Returns
bool True if block is EIP-1559, otherwise false.

◆ isEIP4844()

M8B\EtherBinder\Common\Block::isEIP4844 ( )

Checks if the block looks like coming from EIP-4844 enabled chain by looking if blob fees are defined

See also
https://eips.ethereum.org/EIPS/eip-4844#header-extension
Returns
bool

The documentation for this class was generated from the following file: