From 13fb5d163c8f9b0fe9b3aed32cde328cc8c5ad67 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 23 Oct 2023 16:30:51 +0200 Subject: [PATCH] fix setting 0x1 type --- libs/remix-lib/src/execution/txRunnerWeb3.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/remix-lib/src/execution/txRunnerWeb3.ts b/libs/remix-lib/src/execution/txRunnerWeb3.ts index 3eaa67dc2b..e72fe79840 100644 --- a/libs/remix-lib/src/execution/txRunnerWeb3.ts +++ b/libs/remix-lib/src/execution/txRunnerWeb3.ts @@ -22,6 +22,8 @@ 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 tx.type = '0x2' + } else { + tx.type = '0x1' } if (txFee) { if (txFee.baseFeePerGas) { @@ -117,7 +119,7 @@ export class TxRunnerWeb3 { txCopy.maxFeePerGas = Math.ceil(Number((toBigInt(network.lastBlock.baseFeePerGas) + toBigInt(network.lastBlock.baseFeePerGas) / BigInt(3)).toString())) } else { txCopy.type = '0x1' - txCopy.gasPrice = toBigInt(network.lastBlock.baseFeePerGas).toString() + txCopy.gasPrice = undefined } } this.getWeb3().eth.estimateGas(txCopy)