Go to file
2017-12-13 21:06:56 +08:00
src eth_getBlockTransactionCountByNumber 2017-12-13 21:06:56 +08:00
test eth_getBlockTransactionCountByNumber 2017-12-13 21:06:56 +08:00
.gitignore Web3 2017-12-12 11:52:52 +08:00
.travis.yml Remove php 7.0 in travisci 2017-12-12 12:24:11 +08:00
composer.json Remove php 7.0 in travisci 2017-12-12 12:24:11 +08:00
LICENSE Initial commit 2017-11-23 10:28:20 +08:00
phpunit.xml Web3 2017-12-12 11:52:52 +08:00
README.md README.md 2017-12-12 12:16:33 +08:00

web3.php

Build Status codecov

A php interface for interacting with the Ethereum blockchain and ecosystem.

Install

composer sc0vu/web3.php

Usage

Web3

simple
use Web3/Web3;

$web3 = new Web3('http://localhost:8545');
$web3->clientVersion(function ($err, $version) {
    if ($err !== null) {
        // do something
        return;
    }
    if (isset($client->result)) {
        echo 'Client version: ' . $version->result;
    } else {
        // do something rpc error
    }
});
batch
use Web3/Web3;

$web3 = new Web3('http://localhost:8545');
$web3->batch(true);
$web3->clientVersion();
$web3->hash('0x1234');
$web3->execute(function ($err, $data) {
    if ($err !== null) {
        // do something
        return;
    }
    // do something
})

Eth

Todo

License

MIT