Skip to content

getGasPrice

Returns the current price of gas (in wei).

Usage

example.ts
import { publicClient } from './client'
 
const gasPrice = await publicClient.getGasPrice() 

Returns

bigint

The gas price (in wei).

JSON-RPC Method

eth_gasPrice