Skip to content

getGasPrice

Returns the current price of gas (in drip).

Usage

example.ts
import { publicClient } from "./client";

const gasPrice = await publicClient.getGasPrice();

Returns

bigint

The gas price (in drip).

JSON-RPC Method

cfx_gasprice