Search code examples
web3jsthundercore

What gas price should I set for my transactions to ThunderCore?


How do I determine the optimal gas price to use when sending transactions to ThunderCore? What if my existing code expects a gas price oracle REST API like ETH Gas station or Etherscan?


Solution

  • Fees for transactions on ThunderCore are specified using separate fields:

    • gas price
    • gas limit

    (like on Ethereum).

    Gas Price

    • Use the eth_gasPrice RPC call to get the moving average of recent price

    Gas Limit

    • Use the eth_estimateGas RPC call to estimate the computation and storage cost required by the transaction.
    • If you know for sure the destination address is a regular account and not a smart contract, you can use specify a gas limit of 21 KWei (21,000 Wei)