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\BlockNonce Class Reference
Inheritance diagram for M8B\EtherBinder\Common\BlockNonce:
M8B\EtherBinder\Common\Hash M8B\EtherBinder\Common\BinarySerializableInterface M8B\EtherBinder\Common\HashSerializable

Public Member Functions

 toHex (bool $with0x=true)
 
 toHex ()
 
 toHex ()
 
 toBin ()
 
 eq (Hash $b)
 
 isNull ()
 

Static Public Member Functions

static fromHex (string $hex)
 
static fromBin (string $bin)
 
static NULL ()
 

Protected Attributes

const dataSizeBytes = 8
 
string $bytes
 

Detailed Description

BlockNonce represents Ethereum block nonces. It consists of 8 bytes.

Author
DubbaThony

Member Function Documentation

◆ eq()

M8B\EtherBinder\Common\Hash::eq ( Hash $b)
inherited

Checks for equality with another Hash or Hash-derivative object.

Parameters
static$bAnother object to compare against.
Returns
bool True if equal, false otherwise.

◆ fromBin()

static M8B\EtherBinder\Common\Hash::fromBin ( string $bin)
staticinherited

Initializes from a binary string.

Parameters
string$binBinary data.
Returns
static
Exceptions
InvalidLengthException

Implements M8B\EtherBinder\Common\BinarySerializableInterface.

◆ fromHex()

static M8B\EtherBinder\Common\Hash::fromHex ( string $hex)
staticinherited

Initializes from a hexadecimal string.

Parameters
string$hexHexadecimal data.
Returns
static
Exceptions
InvalidHexLengthException
InvalidHexException

Implements M8B\EtherBinder\Common\BinarySerializableInterface.

Reimplemented in M8B\EtherBinder\Common\Address.

◆ isNull()

M8B\EtherBinder\Common\Hash::isNull ( )
inherited

Checks if inner data contains only zeroes (equals to static::NULL())

Returns
bool true if inner data is null data, false otherwise

◆ NULL()

static M8B\EtherBinder\Common\Hash::NULL ( )
staticinherited

Initializes object with all zeros.

Returns
static The null object.

◆ toBin()

M8B\EtherBinder\Common\Hash::toBin ( )
inherited

Converts the internal data into to a binary string.

Returns
string Binary representation.

Implements M8B\EtherBinder\Common\BinarySerializableInterface.

◆ toHex() [1/3]

M8B\EtherBinder\Common\BinarySerializableInterface::toHex ( )
inherited

◆ toHex() [2/3]

M8B\EtherBinder\Common\Hash::toHex ( bool $with0x = true)
inherited

Converts the internal data into to a hexadecimal string.

Parameters
bool$with0xFlag to include "0x" prefix or not.
Returns
string Hexadecimal representation.

◆ toHex() [3/3]

M8B\EtherBinder\Common\HashSerializable::toHex ( )
inherited

Implemented in M8B\EtherBinder\Utils\OOGmp.


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