In order to keep this API up do date it is build schema based. (resources/ethjs-schema.json)
Ethereum JsonRPC Methods are on ethereum-schema->methods. Implemented in Ethereum class. Check out the Web3Interface.
To regenerate src/Web3Methods.php and src/Web3Interface.php run
Complex Data types are generated ethereum-schema->objects.
Currently these are:
To regenerate run
See phpunit.xml and tests/
Based on TestStatic.php
vendor/bin/phpunit --testsuite EthereumPhp
or a single test class
vendor/bin/phpunit --filter {FunctionSignatureTest}
You can us this library to test smart contracts in combination with truffle. This are tests based on TestEthClient.php
It requires a running Ethereum node, with the contracts deployed to. The following example uses Truffle and Ganache.
Smart contract test workflow
test_contracts/build/CONTRACT-NAME.json
$this->contract
available and can call functions. See example.Prepare contract testing
You may define NETWORK_ID
and SERVER_URL
to perform testing against multiple Ethereum clients.
The API documentation is auto-generated by doxygen.
There is a online version of this API documentation at http://ethereum-php.org/dev
Doxygen script does some pre processing which requires GNU-sed on OSX brew install gnu-sed --with-default-names
See: https://stackoverflow.com/a/27834828/308533
Many thanks to...
Ethereum-PHP library is part of the Drupal Ethereum Module.