2017 © Pedro Peláez
 

library erc20-php

Interact with any ERC20 standard Ethereum token

image

lidelin/erc20-php

Interact with any ERC20 standard Ethereum token

  • Wednesday, July 18, 2018
  • by lidelin
  • Repository
  • 1 Watchers
  • 0 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 5 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

forked from furqansiddiqui/erc20-php, (*1)

ERC20 Tokens

Interact with any ERC20 standard Ethereum token, (*2)

This package is ultimate response to historic issue of no native API being available to PHP developers to interact with ERC20 tokens (i.e. web3js contracts API)., (*3)

This package communicates directly with Geth using RPC (lidelin/ethereum-rpc) and performs all ABI encoding and decoding in background, resulting in pure simple and easy to use API for developers to perform all ERC20 standard operations., (*4)

Demo

  • A random ERC20 token was picked from a list, given contract address 0xd26114cd6EE289AccF82350c8d8487fedB8A0C07
$geth = new EthereumRPC('127.0.0.1', 8545);
$erc20 = new \ERC20\ERC20($geth);
$token = $erc20->token('0xd26114cd6EE289AccF82350c8d8487fedB8A0C07');

var_dump($token->name());
var_dump($token->symbol());
var_dump($token->decimals());

Result:, (*5)

string(8) "OMGToken"
string(3) "OMG"
int(18)

Installation

composer require lidelin/erc20-php, (*6)

Prerequisites

ABI

A standard ERC20 ABI file is included in package residing in "data" directory., (*7)

Path to a custom ABI may be specified when constructing ERC20 token object., (*8)

$geth = new EthereumRPC('127.0.0.1', 8545);
$erc20 = new \ERC20\ERC20($geth);
$erc20->abiPath('/path/to/abi.json');

The Versions

18/07 2018

dev-master

9999999-dev

Interact with any ERC20 standard Ethereum token

  Sources   Download

MIT

The Requires

 

token ethereum tokens eth geth ethereum-go erc20

18/07 2018

0.1.2

0.1.2.0

Interact with any ERC20 standard Ethereum token

  Sources   Download

MIT

The Requires

 

token ethereum tokens eth geth ethereum-go erc20

29/05 2018

0.1.1

0.1.1.0

Interact with any ERC20 standard Ethereum token

  Sources   Download

MIT

The Requires

 

token ethereum tokens eth geth ethereum-go erc20

09/05 2018

0.1.0

0.1.0.0

Interact with any ERC20 standard Ethereum token

  Sources   Download

MIT

The Requires

 

token ethereum tokens eth geth ethereum-go erc20