2017 © Pedro Peláez
 

library php-etherscan-api

PHP client for the Etherscan API

image

maslakoff/php-etherscan-api

PHP client for the Etherscan API

  • Saturday, March 24, 2018
  • by maslakoff
  • Repository
  • 1 Watchers
  • 3 Stars
  • 43 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 87 % Grown

The README.md

EtherScan PHP API

PHP wrapper for the EtherScan API, (*1)

License: MIT, (*2)

Official API Documentation, (*3)

Create API Key (optional), (*4)

Requirements

The minimum requirement by EtherScan API is that your Web server supports PHP 5.6., (*5)

Installation

To install EtherScan PHP API package you can run command:, (*6)

composer require maslakoff/php-etherscan-api:dev-master

Usage

Mainnet, (*7)

$client = new \Etherscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V');
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');

For testnet usage

Supported:, (*8)

  • 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:, (*9)

$bsc_client = new \Etherscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', EtherscanAPIConf::NET_BSC);
$bsc_client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');

The Versions

24/03 2018

dev-master

9999999-dev https://github.com/maslakoff/php-etherscan-api

PHP client for the Etherscan API

  Sources   Download

MIT

The Requires

  • php ^5.6 || ^7.0

 

The Development Requires

api ethereum etherscan etherscan.io