baumann-at / php-polygonscan-api
PHP client for the Polygonscan API
1.3.9
2022-04-15 07:49 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
README
PHP wrapper for the Polygonscan API - forked from https://github.com/maslakoff/php-etherscan-api
Requirements
The minimum requirement by Polygonscan API is that your Web server supports PHP 5.6.
Installation
To install Polygonscan PHP API package you can run command:
composer require baumann-at/php-polygonscan-api:dev-master
Usage
Mainnet
$client = new \Polygonscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V'); $client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
For testnet usage
Supported:
- mumbai
$client = new \Polygonscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', PolygonscanAPIConf::TESTNET_MUMBAI); $client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');