Ethereum PHP
PHP interface to Ethereum JSON-RPC API.
Block Class Reference
+ Inheritance diagram for Block:
+ Collaboration diagram for Block:

Public Member Functions

 __construct (EthQ $number=null, EthD32 $hash=null, EthD32 $parentHash=null, EthD $nonce=null, EthD $sha3Uncles=null, EthD $logsBloom=null, EthD $transactionsRoot=null, EthD $stateRoot=null, EthD $receiptsRoot=null, EthD $miner=null, EthQ $difficulty=null, EthQ $totalDifficulty=null, EthD $extraData=null, EthQ $size=null, EthQ $gasLimit=null, EthQ $gasUsed=null, EthQ $timestamp=null, array $transactions=null, array $uncles=null)
 
 toArray ()
 
- Public Member Functions inherited from EthDataType
 getProperty (string $property='value', bool $returnHexVal=false)
 
 setValue ($val, array $params=[])
 
 getClassName ()
 

Static Public Member Functions

static getTypeArray ()
 
- Static Public Member Functions inherited from EthDataType
const static getClassByAbi (string $abiType)
 
static getDataLengthType ()
 
static isPrimitive ()
 
static getTypeClass (string $type, bool $typed_constructor=false)
 
static getAllTypeClasses ()
 
- Static Public Member Functions inherited from EthereumStatic
static getMethodSignature ($input)
 
static phpKeccak256 ($string)
 
static sha3 ($string)
 
static isValidFunction ($input)
 
static getDefinition ()
 
static isValidHexQuantity ($str)
 
static isValidHexData ($str)
 
static isValidAddress ($address, $throw=false)
 
static hasHexPrefix ($str)
 
static removeHexPrefix ($str)
 
static ensureHexPrefix ($str)
 
static convertCurrency (float $amount, string $from='wei', string $to='ether')
 

Public Attributes

 $number
 
 $hash
 
 $parentHash
 
 $nonce
 
 $sha3Uncles
 
 $logsBloom
 
 $transactionsRoot
 
 $stateRoot
 
 $receiptsRoot
 
 $miner
 
 $difficulty
 
 $totalDifficulty
 
 $extraData
 
 $size
 
 $gasLimit
 
 $gasUsed
 
 $timestamp
 
 $transactions
 
 $uncles
 

Detailed Description

Ethereum data type Block.

Generated by scripts/generate-complex-datatypes.php based on resources/ethjs-schema.json.

Definition at line 18 of file Block.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( EthQ  $number = null,
EthD32  $hash = null,
EthD32  $parentHash = null,
EthD  $nonce = null,
EthD  $sha3Uncles = null,
EthD  $logsBloom = null,
EthD  $transactionsRoot = null,
EthD  $stateRoot = null,
EthD  $receiptsRoot = null,
EthD  $miner = null,
EthQ  $difficulty = null,
EthQ  $totalDifficulty = null,
EthD  $extraData = null,
EthQ  $size = null,
EthQ  $gasLimit = null,
EthQ  $gasUsed = null,
EthQ  $timestamp = null,
array  $transactions = null,
array  $uncles = null 
)
Parameters
EthQ$number
EthD32$hash
EthD32$parentHash
EthD$nonce
EthD$sha3Uncles
EthD$logsBloom
EthD$transactionsRoot
EthD$stateRoot
EthD$receiptsRoot
EthD$miner
EthQ$difficulty
EthQ$totalDifficulty
EthD$extraData
EthQ$size
EthQ$gasLimit
EthQ$gasUsed
EthQ$timestamp
array$transactionsArray of Transaction
array$unclesArray of EthD

Definition at line 136 of file Block.php.

References Block\$difficulty, Block\$extraData, Block\$gasLimit, Block\$gasUsed, Block\$hash, Block\$logsBloom, Block\$miner, Block\$nonce, Block\$number, Block\$parentHash, Block\$receiptsRoot, Block\$sha3Uncles, Block\$size, Block\$stateRoot, Block\$timestamp, Block\$totalDifficulty, Block\$transactions, Block\$transactionsRoot, and Block\$uncles.

Member Function Documentation

◆ getTypeArray()

static getTypeArray ( )
static

Returns a name => type array.

Definition at line 161 of file Block.php.

◆ toArray()

toArray ( )

Returns array with values.

Implements EthDataTypeInterface.

Definition at line 188 of file Block.php.

References Ethereum\valueArray().

+ Here is the call graph for this function:

Member Data Documentation

◆ $difficulty

$difficulty

Value for 'difficulty'.

Definition at line 73 of file Block.php.

Referenced by Block\__construct().

◆ $extraData

$extraData

Value for 'extraData'.

Definition at line 83 of file Block.php.

Referenced by Block\__construct().

◆ $gasLimit

$gasLimit

Value for 'gasLimit'.

Definition at line 93 of file Block.php.

Referenced by Block\__construct().

◆ $gasUsed

$gasUsed

Value for 'gasUsed'.

Definition at line 98 of file Block.php.

Referenced by Block\__construct().

◆ $hash

$hash

Value for 'hash'.

Definition at line 28 of file Block.php.

Referenced by Block\__construct().

◆ $logsBloom

$logsBloom

Value for 'logsBloom'.

Definition at line 48 of file Block.php.

Referenced by Block\__construct().

◆ $miner

$miner

Value for 'miner'.

Definition at line 68 of file Block.php.

Referenced by Block\__construct().

◆ $nonce

$nonce

Value for 'nonce'.

Definition at line 38 of file Block.php.

Referenced by Block\__construct().

◆ $number

$number

Value for 'number'.

Definition at line 23 of file Block.php.

Referenced by Block\__construct().

◆ $parentHash

$parentHash

Value for 'parentHash'.

Definition at line 33 of file Block.php.

Referenced by Block\__construct().

◆ $receiptsRoot

$receiptsRoot

Value for 'receiptsRoot'.

Definition at line 63 of file Block.php.

Referenced by Block\__construct().

◆ $sha3Uncles

$sha3Uncles

Value for 'sha3Uncles'.

Definition at line 43 of file Block.php.

Referenced by Block\__construct().

◆ $size

$size

Value for 'size'.

Definition at line 88 of file Block.php.

Referenced by Block\__construct().

◆ $stateRoot

$stateRoot

Value for 'stateRoot'.

Definition at line 58 of file Block.php.

Referenced by Block\__construct().

◆ $timestamp

$timestamp

Value for 'timestamp'.

Definition at line 103 of file Block.php.

Referenced by Block\__construct().

◆ $totalDifficulty

$totalDifficulty

Value for 'totalDifficulty'.

Definition at line 78 of file Block.php.

Referenced by Block\__construct().

◆ $transactions

$transactions

Value for 'transactions'.

Definition at line 108 of file Block.php.

Referenced by Block\__construct().

◆ $transactionsRoot

$transactionsRoot

Value for 'transactionsRoot'.

Definition at line 53 of file Block.php.

Referenced by Block\__construct().

◆ $uncles

$uncles

Value for 'uncles'.

Definition at line 113 of file Block.php.

Referenced by Block\__construct().


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