Skip to main content

Polygon zkEVM Gas Station

The goal of Polygon zkEVM Gas Station is to provide dApp developers with gas pricing suggestions so they can use it before sending transactions to the Polygon zkEVM network. The prediction method is modelled after the Polygon Gas Station but is unique in its own ways.

Polygon zkEVM Gas Station is currently deployed on the zkEVM Mainnet Beta and Blueberry testnet, where it analyzes recent 1500 transactions and recommends gas price.

Usage

Send a GET request to the zkEVM Gas Station endpoint to get a gas price recommendation from this oracle.

cURL

curl https://gasstation.polygon.technology/zkevm

JavaScript

fetch('https://gasstation.polygon.technology/zkevm')
.then(response => response.json())
.then(json => console.log(json))

Python

import requests
requests.get('https://gasstation.polygon.technology/zkevm').json()

Interpretation

An example JSON response will look like this.

{
"safeLow":1,
"standard":1,
"fast":1,
"fastest":1,
"blockTime":2,
"blockNumber":308789
}
  • {'safelow', 'standard', 'fast', 'fastest'} are gas prices in GWei, you can use these prices before sending transaction off to Polygon zkEVM, depending upon your needs
  • blockTime, in seconds, gives average block time of the network.
  • blockNumber provides the information of latest block mined when recommendation was made