Skip to content

A real-time, easy-to-use tool for Web3 developers, providing the latest gas prices for top EVM chains via a free public API. Streamline your blockchain interactions with up-to-date, reliable gas price data. 🚀🌐

License

Notifications You must be signed in to change notification settings

web3toolz/gasprice-oracle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gasprice oracle

GitHub Workflow Status (with event)  



Tool is designed to empower Web3 developers by providing real-time, accurate, and relevant gas price data for the top EVM (Ethereum Virtual Machine) compatible blockchains. Our goal is to streamline your development process by offering easy access to essential network information through a free, public API.

Features

  • Top EVM Chains Support: Access gas price data from the most popular EVM-compatible blockchains.
  • Real-Time Data: Stay up-to-date with the latest gas prices, ensuring efficient and cost-effective transactions.
  • Free Public API: Easy and open access for all developers. No API key required.

Getting Started

UI Component

Install

cd ui
yarn install

Prepare configuration

Copy .env.template to .env.local and edit it.

cp .env.template .env.local

Run server in development mode

Go to https://localhost:3000 in your browser.

yarn dev

Build static files

They will be placed in out directory.

yarn build

Backend component

Install

cd backend
go install 

Prepare configuration

Copy config.example.yaml to config.yaml to the same directory and edit it.

cp config.example.yaml config.yaml

Run server in development mode

go run cmd/cli/main.go server

Request data from server

curl -X GET http://localhost:8080/ | jq

Build application

go build -o gasprice-oracle cmd/cli/main.go

API Documentation

Endpoints

  • GET "/" - get latest gas price data

Response format

The API returns data in JSON format. Here is an example of a successful response:

{
  "networkName": {
    "updatedAt": 1700149263,
    "slow": 100000000,
    "normal": 100000000,
    "fast": 100000000,
    "fastest": 100000000
  }
}

Slow, normal, fast, and fastest strategies for gas price are in wei.

Supported Chains

  • Ethereum
  • Binance Smart Chain
  • Polygon
  • Avalanche
  • Fantom
  • Arbitrum One
  • Base
  • Fantom
  • Optimism
  • more to be added...

License

Distributed under the MIT License. See LICENSE for more information.

About

A real-time, easy-to-use tool for Web3 developers, providing the latest gas prices for top EVM chains via a free public API. Streamline your blockchain interactions with up-to-date, reliable gas price data. 🚀🌐

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published