Public Member Functions | |
__construct (array $abi) | |
encodeFunction (string $methodName, array $values) | |
decodeMethod (string $method, EthD $rawReturn) | |
getParamDefinition (string $methodName) | |
getEvents () | |
getEventsByTopic () | |
Static Public Member Functions | |
static | convertByAbi (string $abiType, EthD $value) |
![]() | |
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') |
__construct | ( | array | $abi | ) |
|
static |
Convert EthD value into ABI expected value.
This function maps the Ethereum data type ABI to the Ethereum<Class>
https://solidity.readthedocs.io/en/develop/abi-spec.html#types
Other implementations: https://github.com/ethereumjs/ethereumjs-abi/blob/71f123b676f2b2d81bc20f343670d90045a3d3d8/lib/index.js#L427-L485 https://github.com/Nethereum/Nethereum/blob/9eb30b298a28634d41034c1cc4b1c0354a37c175/src/Nethereum.ABI/ABIType.cs#L34-L58
Test examples: https://github.com/ethereumjs/ethereumjs-abi/blob/master/test/index.js https://github.com/ethereum/web3.js/blob/master/test/coder.encodeParam.js https://github.com/ethereum/web3.js/blob/master/test/coder.decodeParam.js
Definition at line 206 of file Abi.php.
References EthD\hexVal().
Referenced by EthD\convertByAbi().
decodeMethod | ( | string | $method, |
EthD | $rawReturn | ||
) |
Decode return values of Abi $method.
$method | |
$rawReturn |
Definition at line 65 of file Abi.php.
References EthD\hexVal().
encodeFunction | ( | string | $methodName, |
array | $values | ||
) |
getEventsByTopic | ( | ) |
getParamDefinition | ( | string | $methodName | ) |