Download the PHP package furqansiddiqui/erc20-php without Composer
On this page you can find all versions of the php package furqansiddiqui/erc20-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download furqansiddiqui/erc20-php
More information about furqansiddiqui/erc20-php
Files in furqansiddiqui/erc20-php
Package erc20-php
Short Description Interact with any ERC20 standard/backward-compatible Ethereum token
License MIT
Rated 5.00 based on 2 reviews
Informations about the package erc20-php
ERC20 Tokens
Interact with any ERC20 standard Ethereum token
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).
This package relies on furqansiddiqui/ethereum-php package to perform
all ABI
encoding and decoding,
as well as communication with Ethereum node using RPC/API, resulting in pure simple and easy to use API for developers
to perform all ERC20 standard operations.
Ethereum Node | Status |
---|---|
Geth / Ethereum-Go RPC | :heavy_check_mark: |
Infura.IO | :heavy_check_mark: |
Demo
- Testing interaction with
Thether USD
/USDT
ERC20 smart contract:
string(9) "TetherUSD" string(4) "USDT" int(6) string(18) "32284517903064882" string(11) "53150417979" string(12) "53150.417979"
## Custom ABI
* Standard/base ERC20 ABI is included in package.
* To included extended/custom ERC20 ABI (depending on your requirments), use one of the following methods:
* Extend [BaseERC20Contract](src/BaseERC20Contract.php) class to define custom ABI functions and events.
* Decode your custom ABI JSON file and provide it to constructor:
### Scaled Values
Use `getScaledValue` and `fromScaledValue` to convert amounts from/to `uint256`.
### Prerequisites
* **PHP** ^8.1
* **Ethereum PHP lib** ([furqansiddiqui/ethereum-php](https://github.com/furqansiddiqui/ethereum-php/)) > 0.2.0
## Installation
`composer require furqansiddiqui/erc20-php`
## Changelog
* **0.3.0**: This library alongside several others such
as [ethereum-php](https://github.com/furqansiddiqui/ethereum-php/) have been modernised and requires PHP ^8.1.