Block
in package
Block is a container for Ethereum block and contains various attributes related to it.
Tags
Table of Contents
Properties
- $baseFeePerGas : OOGmp|null
- $blobGasUsed : int|null
- $difficulty : OOGmp
- $excessBlobGas : int|null
- $extraData : string
- $gasLimit : int
- $gasUsed : int
- $hash : Hash
- $logsBloom : Bloom
- $miner : Address
- $nonce : BlockNonce
- $number : int
- $parentBeaconBlockRoot : Hash|null
- $parentHash : Hash
- $receiptsRoot : Hash
- $sha3Uncles : Hash
- $size : int
- $stateRoot : Hash
- $timestamp : int
- $totalDifficulty : OOGmp
- $transactions : array<string|int, Transaction>|array<string|int, Hash>
- $transactionsRoot : Hash
- $uncles : array<string|int, Hash>
- $validatorWithdrawals : array<string|int, ValidatorWithdrawal>
- $validatorWithdrawalsRoot : Hash|null
Methods
- fromRPCArr() : static
- Constructs a Block object from an array received through RPC.
- isEIP1559() : bool
- Checks if the block looks like coming from EIP-1559 enabled chain by looking if base fee is defined.
- isEIP4844() : bool
- Checks if the block looks like coming from EIP-4844 enabled chain by looking if blob fees are defined
Properties
$baseFeePerGas
public
OOGmp|null
$baseFeePerGas
$blobGasUsed
public
int|null
$blobGasUsed
$difficulty
public
OOGmp
$difficulty
$excessBlobGas
public
int|null
$excessBlobGas
$extraData
public
string
$extraData
$gasLimit
public
int
$gasLimit
$gasUsed
public
int
$gasUsed
$hash
public
Hash
$hash
$logsBloom
public
Bloom
$logsBloom
$miner
public
Address
$miner
$nonce
public
BlockNonce
$nonce
$number
public
int
$number
$parentBeaconBlockRoot
public
Hash|null
$parentBeaconBlockRoot
$parentHash
public
Hash
$parentHash
$receiptsRoot
public
Hash
$receiptsRoot
$sha3Uncles
public
Hash
$sha3Uncles
$size
public
int
$size
$stateRoot
public
Hash
$stateRoot
$timestamp
public
int
$timestamp
$totalDifficulty
public
OOGmp
$totalDifficulty
$transactions
public
array<string|int, Transaction>|array<string|int, Hash>
$transactions
$transactionsRoot
public
Hash
$transactionsRoot
$uncles
public
array<string|int, Hash>
$uncles
$validatorWithdrawals
public
array<string|int, ValidatorWithdrawal>
$validatorWithdrawals
$validatorWithdrawalsRoot
public
Hash|null
$validatorWithdrawalsRoot
Methods
fromRPCArr()
Constructs a Block object from an array received through RPC.
public
static fromRPCArr(array<string|int, mixed> $rpcArr) : static
Parameters
- $rpcArr : array<string|int, mixed>
-
The array containing block data.
Tags
Return values
static —The Block object.
isEIP1559()
Checks if the block looks like coming from EIP-1559 enabled chain by looking if base fee is defined.
public
isEIP1559() : bool
Return values
bool —True if block is EIP-1559, otherwise false.
isEIP4844()
Checks if the block looks like coming from EIP-4844 enabled chain by looking if blob fees are defined
public
isEIP4844() : bool