Skip to main content

Gas Estimation and Overrides

The SDK allows you to:

  • View the current gas cost in gwei
  • Estimate the gas cost of a transaction at the current point in time
  • Override parts of a transaction (e.g. gas limit, gas price, nonce, from, value, etc...)

Current Gas Price

const gasCostInGwei = await contract.estimator.currentGasPriceInGwei();
View in React SDK Documentation

Estimate Transaction Gas Cost

const costOfClaim = await nftDrop?.estimator.gasCostOf("claim", [
"0x...", // receiver
1, // quantity
"0x...", // currency
1, // price per token
[], // proofs
1, // proof max quantity per transaction
View in React SDK Documentation

Override Transaction Data

contract.interceptor.overrideNextTransaction(() => ({
gasLimit: 3000000,
View in React SDK Documentation