From 825f4665fb8720d95aa6b47b0953453b84db62bb Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 21 Dec 2022 09:50:42 +0100 Subject: [PATCH] fix gasEstimation --- libs/remix-simulator/src/methods/transactions.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/remix-simulator/src/methods/transactions.ts b/libs/remix-simulator/src/methods/transactions.ts index c1ddab391b..f743976a15 100644 --- a/libs/remix-simulator/src/methods/transactions.ts +++ b/libs/remix-simulator/src/methods/transactions.ts @@ -172,7 +172,8 @@ export class Transactions { if (result.execResult.gasRefund) { gasUsed += result.execResult.gasRefund } - cb(null, Math.ceil(Number(gasUsed) + (15 * Number(gasUsed)) / 100) + Number(value.tx.getBaseFee())) + gasUsed = gasUsed + value.tx.getBaseFee() + cb(null, Math.ceil(Number(gasUsed) + (15 * Number(gasUsed)) / 100)) }) }