eth_gasPrice

Retrieves the current gas price from the Ethereum network.

Example

import { getRpcClient, eth_gasPrice } from "thirdweb/rpc";
const rpcRequest = getRpcClient({ client, chain });
const gasPrice = await eth_gasPrice(rpcRequest);

Parameters

Returns

A promise that resolves to the gas price as a bigint.