“PHP library to integrate
Ethereum ERC20 tokens”
Interact with any ERC20 standard Ethereum token
This package is the ultimate response to historic issue of no native API being available to PHP developers to interact with ERC20 tokens (i.e. web3js contracts API).
This package communicates directly with Ethereum daemon (i.e. ethereum-go) and performs all ABI encoding and decoding for ERC20 contracts in background, resulting in pure simple and easy to use API for developers to perform all ERC20 standard operations.
How it works?
An ERC20 contract address was picked randomly from an index, and here is how simple it is to work with it:
$geth = new EthereumRPC('127.0.0.1', 8545);
$erc20 = new \ERC20\ERC20($geth);
$token = $erc20->token('0xd26114cd6EE289AccF82350c8d8487fedB8A0C07');
var_dump($token->name()); # string(8) "OMGToken"
var_dump($token->symbol()); # string(3) "OMG"
var_dump($token->decimals()); # int(18)
Installation and Prerequisites
All you need is PHP 7.1+ and you are all set to install this lib using composer:
composer require furqansiddiqui/erc20-php
Changelog, Licensing, Releases, etc…
This library is released under MIT license. Changelog, releases, downloads and other documentations are maintained as part of our official repository hosted on GitHub:
Don’t forget to follow 😉