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

Public Member Functions

 validateLength ($val)
 isNotNull ()
- Public Member Functions inherited from EthD
const const __construct ($val, array $params=[])
 convertByAbi ($abiType)
 validate ($val, array $params)
 validateHexString ($val)
 convertTo ($type)
 toArray ()
 hexVal ()
 encodedHexVal ()
 val ()
- Public Member Functions inherited from EthDataType
 getProperty (string $property='value', bool $returnHexVal=false)
 setValue ($val, array $params=[])
 getClassName ()

Static Public Member Functions

static unPadEnsureLength ($string)
static getDataLengthType ()
- Static Public Member Functions inherited from EthD
static getPrimitiveTypes ()
static isPrimitive ()
static typeMap (string $type)
static reverseTypeMap ($class_name)
static getSchemaType ()
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')

Additional Inherited Members

- Protected Attributes inherited from EthD

Detailed Description

Byte data, length 20.

Represents 40 hex characters, 160 bits. E.g Ethereum Address.

Definition at line 14 of file EthD20.php.

Member Function Documentation

◆ getDataLengthType()

static getDataLengthType ( )

Implements EthDataTypeInterface.

Definition at line 79 of file EthD20.php.

◆ isNotNull()

isNotNull ( )

Checks if address is not null.


Definition at line 71 of file EthD20.php.

◆ unPadEnsureLength()

static unPadEnsureLength (   $string)

Converts Hex to string.

string$stringHex string to be converted.
string If address can't be decoded.
ExceptionIf string is not a formally valid address.

Definition at line 50 of file EthD20.php.

References $address.

Referenced by EthD20\validateLength().

+ Here is the caller graph for this function:

◆ validateLength()

validateLength (   $val)

Implement validation.

string$valHexadecimal "0x"prefixed byte value.
ExceptionIf things are wrong.
string Validated D20 value.

Definition at line 28 of file EthD20.php.

References EthD20\unPadEnsureLength().

+ Here is the call graph for this function:

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