maslakoff/php-etherscan-api
最新稳定版本:1.3.10
Composer 安装命令:
composer require maslakoff/php-etherscan-api
包简介
PHP client for the Etherscan API
README 文档
README
PHP wrapper for the EtherScan API
Requirements
The minimum requirement by EtherScan API is that your Web server supports PHP 5.6.
Installation
To install EtherScan PHP API package you can run command:
composer require maslakoff/php-etherscan-api:dev-master
Usage
Mainnet
$client = new \Etherscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V'); $client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
For testnet usage
Supported:
- goerli
- ropsten
- kovan
- rinkeby
$client = new \Etherscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', EtherscanAPIConf::TESTNET_RINKEBY); $client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
For Binance Smart Chain (BSC) usage
In order to query the BSC you need a different API. You can obtain it here: https://bscscan.com/apis. Here the call:
$bsc_client = new \Etherscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', EtherscanAPIConf::NET_BSC); $bsc_client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
统计信息
- 总下载量: 18.15k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 29
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-03-24