w3spi5 / php-bscscan-api
PHP client for the Bscscan API
0.9.0
2022-02-18 19:53 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 Bscscan API
Requirements
The minimum requirement by Bscscan API is that your Web server supports PHP 5.6.
Installation
To install Bscscan PHP API package you can run command:
composer require w3spi5/php-bscscan-api:dev-master
Usage
Mainnet
$client = new \Bscscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V'); $client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
For testnet usage
Supported:
- Testnet
$client = new \Bscscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', BscscanAPIConf::TESTNET); $client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');
Pull requests are welcome
This package was adapted from Maslakou Ihar's excellent package called php-etherscan-api (that I contributed to). Despite all the care taken, it is possible that there are errors due to the copy of the code. Feel free to submit a pull request if needed.