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\SolidityFunction4BytesSignature Class Reference
Inheritance diagram for M8B\EtherBinder\Common\SolidityFunction4BytesSignature:
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 fromSignature (string $functionSignature)
 
static fromHex (string $hex)
 
static fromBin (string $bin)
 
static NULL ()
 

Public Attributes

const dataSizeBytes = 4
 

Protected Attributes

string $bytes
 

Detailed Description

SolidityFunction4BytesSignature is container class for a 4-byte function signature in Solidity.

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.

◆ fromSignature()

static M8B\EtherBinder\Common\SolidityFunction4BytesSignature::fromSignature ( string $functionSignature)
static

Creates a new SolidityFunction4BytesSignature instance from a full function signature.

Parameters
string$functionSignatureThe complete function signature.
Returns
static A new instance of SolidityFunction4BytesSignature.
Exceptions
EthBinderLogicException

◆ 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: