From 84378f896e8e9947d4af148845d11fbe22d9cf6f Mon Sep 17 00:00:00 2001 From: yann300 Date: Sat, 26 Mar 2022 02:20:10 +0100 Subject: [PATCH] update gasUsed --- 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 32ef9d8a64..4774e948b8 100644 --- a/libs/remix-simulator/src/methods/transactions.ts +++ b/libs/remix-simulator/src/methods/transactions.ts @@ -145,7 +145,8 @@ export class Transactions { return cb(e.message) } } - cb(null, result.result.execResult.gasUsed.toNumber()) + const gasUsed = result.result.execResult.gasUsed.toNumber() + cb(null, Math.ceil(gasUsed + (15 * gasUsed) / 100)) }) }