getGasPrice

Retrieves the gas price for a transaction on a specific chain.

Example

import { getGasPrice } from "thirdweb";
const gasPrice = await getGasPrice({ client, chain });
function getGasPrice(options: GetGasPriceOptions): Promise<bigint>;

Parameters

Type

let options: {
chain: Chain;
client: ThirdwebClient;
percentMultiplier?: number;
};

Returns

let returnType: Promise<bigint>;

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