A hook to estimate the gas cost in ether and wei for a given transaction.
import { useEstimateGasCost } from "thirdweb/react";const { mutate: estimateGasCost, data: gasEstimate } = useEstimateGas(); // laterconst estimatedGas = await estimateGasCost(tx);console.log("gas cost in ether", estimatedGas.ether);
function useEstimateGasCost(): UseMutationResult< EstimateGasCostResult, Error, PreparedTransaction>;
let returnType: UseMutationResult< EstimateGasCostResult, Error, PreparedTransaction>;
A mutation object to estimate gas cost.