Fix estimateGas when maxFee is fluctuating

pull/3678/head
yann300 2 years ago committed by GitHub
parent b7c9ad81c0
commit 87712b4fa1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      libs/remix-lib/src/execution/txRunnerWeb3.ts

@ -113,7 +113,7 @@ export class TxRunnerWeb3 {
// the sending stack (web3.js / metamask need to have the type defined)
// this is to avoid the following issue: https://github.com/MetaMask/metamask-extension/issues/11824
txCopy.type = '0x2'
txCopy.maxFeePerGas = network.lastBlock.baseFeePerGas + 10000 // + priority fee
txCopy.maxFeePerGas = Math.ceil(network.lastBlock.baseFeePerGas + network.lastBlock.baseFeePerGas / 3)
} else {
txCopy.type = '0x1'
txCopy.gasPrice = network.lastBlock.baseFeePerGas

Loading…
Cancel
Save