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
composer run-script generate-methods
Complex Data types are generated ethereum-schema->objects.
Currently these are:
EthSyncing
SendTransaction
EstimateTransaction
CallTransaction
Block
Transaction
Receipt
Filter
FilterChange
SHHPost
SHHFilter
SHHFilterChange
SHHMessage
To regenerate run
composer run-script generate-complex-datatypes
composer install
vendor/bin/phpunit
See phpunit.xml and tests/
Static tests
Based on TestStatic.php
vendor/bin/phpunit --testsuite EthereumPhp
or a single test class
vendor/bin/phpunit --filter {FunctionSignatureTest}
Dynamic tests
Based on TestEthClient.php
Require a Ethereum node to be running.
vendor/bin/phpunit --testsuite TestEthClient
You may define NETWORK_ID
and SERVER_URL
to perform testing against multiple Ethereum clients.
NETWORK_ID='5777' SERVER_URL="http://127.0.0.1:7545" vendor/bin/phpunit
The API documentation is auto-generated by doxygen.
doxygen Doxyfile
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
Ethereum-PHP library is part of the Drupal Ethereum Module.
Many thanks to...
- ConsenSys for sponsoring the Development of Ethereum-PHP library and Drupal module.
- Nick Dodson and Dan Finlay for their work on ethjs-schema. This API is based on it.
- Jim Wigginton for the Math_BigInteger pear package.