Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

021/ethereum-oracles

Package Overview
Dependencies
Maintainers
0
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

021/ethereum-oracles

Getting blockchain statistics from Ethereum oracles

Source
Packagist
Version
dev-master
Version published
Maintainers
0
Created
Source

Ethereum oracles library

A library of convenient interfaces for receiving statistics data from different ethereum oracles.

Ethereum Mainnet oracles

Offchain

ClassSourceFeatures
O21\EthereumOracles\OffChain\Blockscouthttps://blockscout.com/eth/mainnet/api/v1/gas-price-oracleNo
O21\EthereumOracles\OffChain\Etherchainhttps://etherchain.org/api/gasnowInstant
O21\EthereumOracles\OffChain\EthGasStationhttps://ethgasstation.info/json/ethgasAPI.jsonInstant, BlockNumber, Speed
O21\EthereumOracles\OffChain\MaticNetworkhttps://gasstation-mainnet.matic.network/Instant, BlockNumber

Usage

Get stats from Etherchain

use O21\EthereumOracles\OffChain\Etherchain;
# ...

/** \O21\EthereumOracles\FeeStats\Stats $stats */
$stats = (new Etherchain)->getStats();

By default getStats() method fetching all provider supported features, but you can define only specific features like this

use O21\EthereumOracles\OffChain\EthGasStation;
use O21\EthereumOracles\FeeStats\Feature;
# ...

(new EthGasStation)->getStats(Feature::Speed, Feature::BlockNumber);
Stats interface
PropertyDescriptionRequired feature
slowFee for low priority (>= 30 minutes) transaction in GweiNo
standardFee for medium priority (< 5 minutes) transaction in GweiNo
highFee for high priority transaction (< 2 minutes) in GweiNo
instantFee for instant transaction (< 30 seconds) in GweiInstant
speedSmallest value of (gasUsed / gaslimit) from last 10 blocksSpeed
blockNumberLatest block numberBlockNumber

FAQs

Package last updated on 27 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts