021 / ethereum-oracles
从以太坊预言机获取区块链统计数据
v1.0.0
2022-03-27 16:56 UTC
Requires
- php: ^8.1
- ext-bcmath: *
- guzzlehttp/guzzle: ^7.4
Requires (Dev)
- phpunit/phpunit: ^9.5
This package is not auto-updated.
Last update: 2024-09-20 06:04:34 UTC
README
一个方便的接口库,用于接收来自不同以太坊预言机的统计数据。
以太坊主网预言机
链外
用法
从Etherchain获取统计信息
use O21\EthereumOracles\OffChain\Etherchain; # ... /** \O21\EthereumOracles\FeeStats\Stats $stats */ $stats = (new Etherchain)->getStats();
默认情况下,getStats()
方法获取所有提供者支持的功能,但您可以定义仅特定的功能,如下所示
use O21\EthereumOracles\OffChain\EthGasStation; use O21\EthereumOracles\FeeStats\Feature; # ... (new EthGasStation)->getStats(Feature::Speed, Feature::BlockNumber);