le0xcrypto / php-polygonscan-api
PHP client for the Etherscan API
dev-master
2021-07-17 21:08 UTC
Requires
- php: ^5.6 || ^7.0 || ^8.0
Requires (Dev)
- guzzlehttp/guzzle: ~5.0
- mockery/mockery: ~0.8
- phpunit/phpunit: ^5.5 || ^6.0
This package is auto-updated.
Last update: 2024-05-18 03:33:29 UTC
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:
- ropsten
- kovan
- rinkeby
$client = new \Etherscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', EtherscanAPIConf::TESTNET_RINKEBY); $client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');