bert86014/erc20-php
Composer 安装命令:
composer require bert86014/erc20-php
包简介
Interact with any ERC20 standard Ethereum token
README 文档
README
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 communicates directly with Geth using RPC (bert86014/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.
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:
string(8) "OMGToken"
string(3) "OMG"
int(18)
Installation
composer require bert86014/erc20-php
Prerequisites
- PHP >= 7.1+
- Ethereum RPC client (bert86014/ethereum-rpc) > 1.0
ABI
A standard ERC20 ABI file is included in package residing in "data" directory.
Path to a custom ABI may be specified when constructing ERC20 token object.
$geth = new EthereumRPC('127.0.0.1', 8545); $erc20 = new \ERC20\ERC20($geth); $erc20->abiPath('/path/to/abi.json');
Integration
Laravel 5 拓展包: bert86014/laravel-erc20
Sponsor
Thank you for Sponsor Us!!!
BTC/USDT-OMNI: 34BoQPt38uxCDA6W9Dw9i7LgGar6xHoDFG
ETH/USDT-ERC20: 0xd9b020B647245E080890Af29657e30B2e7F45f59
License
This content is released under the MIT License.
bert86014/erc20-php 适用场景与选型建议
bert86014/erc20-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 134 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 05 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「token」 「tokens」 「ethereum」 「eth」 「geth」 「ethereum-go」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 bert86014/erc20-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 bert86014/erc20-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 bert86014/erc20-php 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Bitcoin and Altcoin Payment Gateway for Magento 2 via CoinGate
A package for validating Google Cloud's JWT provided by webhooks
JSON Web Token Authentication for Laravel and Lumen
Laravel token auth cached.
Library for validation of cryptocoin wallets
JSON Web Token Authentication for Laravel and Lumen
统计信息
- 总下载量: 134
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 9
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-30

