PHPackages                             delboy1978uk/ethereum-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. delboy1978uk/ethereum-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

delboy1978uk/ethereum-php
=========================

A library integrating Ethereum with typed PHP.

v1.0.0(6y ago)021MITPHPPHP &gt;=7.1

Since Mar 14Pushed 6y agoCompare

[ Source](https://github.com/delboy1978uk/ethereum-php)[ Packagist](https://packagist.org/packages/delboy1978uk/ethereum-php)[ RSS](/packages/delboy1978uk-ethereum-php/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (6)Versions (3)Used By (0)

Ethereum-PHP
============

[](#ethereum-php)

is a typed PHP-7.1+ interface to [Ethereum JSON-RPC API](https://github.com/ethereum/wiki/wiki/JSON-RPC).

Check out the latest [API documentation](http://ethereum-php.org/dev/).

### Usage

[](#usage)

```
composer require delboy1978uk/ethereum-php
```

This is the important part of [composer.json](https://github.com/delboy1978uk/ethereum/blob/8.x-1.x/composer.json) in [Drupal Ethereum Module](https://drupal.org/project/ethereum).

```
require __DIR__ . '/vendor/autoload.php';
use Ethereum\Ethereum;

try {
	// Connect to Ganache
    $eth = new Ethereum('http://127.0.0.1:7545');
    // Should return Int 63
    echo $eth->eth_protocolVersion()->val();
}
catch (\Exception $exception) {
    die ("Unable to connect.");
}
```

**Calling Contracts**

You can call (unpayed) functions in smart contracts easily.

The json file "$fileName" used is what you get when you compile a contract with [Truffle](truffleframework.com).

```
$ContractMeta = json_decode(file_get_contents($fileName));
$contract = new SmartContract(
  $ContractMeta->abi,
  $ContractMeta->networks->{NETWORK_ID}->address,
  new Ethereum(SERVER_URL)
);
$someBytes = new EthBytes('34537ce3a455db6b')
$x = $contract->myContractMethod();
echo $x->val()
```

You can also run tests at smart contracts, check out EthTestClient.

### Event listening and handling

[](#event-listening-and-handling)

You can use Ethereum-PHP to watch changed on your smart contracts or index a Blockchain block by block. gs

See [UsingFilters](https://github.com/delboy1978uk/ethereum-php/blob/master/UsingFilters.md) and [ethereum-php-eventlistener](https://github.com/delboy1978uk/ethereum-php-eventlistener).

### Limitations

[](#limitations)

Currently not all datatypes are supported.

This library is read-only for now. This means you can retrieve information stored in Ethereum Blockchain.

To *write* to the blockchain you need a to sign transactions with a private key which is not supported yet.

[![architecture diagram](https://raw.githubusercontent.com/delboy1978uk/ethereum-php/dev/doxygen-assets/ArchitectureDiagrammCS6.png "Drupal Ethereum architecture")](https://raw.githubusercontent.com/delboy1978uk/ethereum-php/dev/doxygen-assets/ArchitectureDiagrammCS6.png)

### Documentation

[](#documentation)

The API documentation is available at [ethereum-php.org](http://ethereum-php.org/).

For reference see the [Ethereum RPC documentation](https://github.com/ethereum/wiki/wiki/JSON-RPC) and for data encoding [RLP dcumentation](https://github.com/ethereum/wiki/wiki/RLP) in [Ethereum Wiki](https://github.com/ethereum/wiki).

There is also a more readable [Ethereum Frontier Guide](http://ethereum.gitbooks.io/frontier-guide/content/rpc.html) version.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 79.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2246d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f20859ab2082170605b5961bb1f12493b087b08b7efa3ab0087ddbe0c9e0a94c?d=identicon)[delboy1978uk](/maintainers/delboy1978uk)

---

Top Contributors

[![digitaldonkey](https://avatars.githubusercontent.com/u/444718?v=4)](https://github.com/digitaldonkey "digitaldonkey (164 commits)")[![owenvoke](https://avatars.githubusercontent.com/u/1899334?v=4)](https://github.com/owenvoke "owenvoke (36 commits)")[![delboy1978uk](https://avatars.githubusercontent.com/u/2684575?v=4)](https://github.com/delboy1978uk "delboy1978uk (3 commits)")[![sebnyc](https://avatars.githubusercontent.com/u/19838972?v=4)](https://github.com/sebnyc "sebnyc (2 commits)")[![antohaby](https://avatars.githubusercontent.com/u/3123432?v=4)](https://github.com/antohaby "antohaby (1 commits)")[![Cryt1c](https://avatars.githubusercontent.com/u/8447640?v=4)](https://github.com/Cryt1c "Cryt1c (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/delboy1978uk-ethereum-php/health.svg)

```
[![Health](https://phpackages.com/badges/delboy1978uk-ethereum-php/health.svg)](https://phpackages.com/packages/delboy1978uk-ethereum-php)
```

###  Alternatives

[leth/ip-address

IPv4 and IPv6 address and subnet classes with awesome utility functions.

62716.6k3](/packages/leth-ip-address)[kornrunner/ethereum-offline-raw-tx

Pure PHP Ethereum Offline Raw Transaction Signer

63192.1k22](/packages/kornrunner-ethereum-offline-raw-tx)[web3p/ethereum-util

A collection of utility functions for Ethereum written in PHP.

30420.2k26](/packages/web3p-ethereum-util)[kornrunner/ethereum-address

Pure PHP Ethereum Address Generator / Validator

41113.1k7](/packages/kornrunner-ethereum-address)[digitaldonkey/ecverify

A library integrating Ethereum with typed PHP.

14109.2k2](/packages/digitaldonkey-ecverify)[kornrunner/solidity

Pure PHP implementation of Solidity

1940.5k11](/packages/kornrunner-solidity)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
