baumann-at/php-polygonscan-api

Polygonscan API 的 PHP 客户端

1.3.9 2022-04-15 07:49 UTC

This package is not auto-updated.

Last update: 2024-09-22 23:08:03 UTC


README

Polygonscan API 的 PHP 封装 - 从 https://github.com/maslakoff/php-etherscan-api 分支而来

License: MIT

官方 API 文档

创建 API 密钥(可选)

要求

Polygonscan API 的最低要求是您的 Web 服务器支持 PHP 5.6。

安装

要安装 Polygonscan PHP API 包,您可以运行以下命令

composer require baumann-at/php-polygonscan-api:dev-master

使用方法

主网

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

对于测试网使用

支持

  • mumbai
$client = new \Polygonscan\Client('Y3U3GMFC8P545CFWRU4TET8MY1K79YDZ3V', PolygonscanAPIConf::TESTNET_MUMBAI);
$client->api('account')->balance('0x43406D1baAE11a950DE734DAE4079A3C9Eb48DAf');