From eff5de30465024c3edae8b19d60dd097ae5e8290 Mon Sep 17 00:00:00 2001 From: jangko Date: Sat, 14 Jan 2023 14:14:03 +0700 Subject: [PATCH] fix EIP-3860 intrinsic gas --- nimbus/transaction.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nimbus/transaction.nim b/nimbus/transaction.nim index 17d447428..6857749c2 100644 --- a/nimbus/transaction.nim +++ b/nimbus/transaction.nim @@ -7,7 +7,7 @@ import ./constants, ./errors, eth/[common, keys], ./utils/utils, - common/evmforks, ./vm_gas_costs + common/evmforks, ./vm_gas_costs, ./vm_internals import eth/common/transaction as common_transaction export common_transaction, errors @@ -29,7 +29,7 @@ proc intrinsicGas*(tx: Transaction, fork: EVMFork): GasInt = if tx.contractCreation: result = result + gasFees[fork][GasTXCreate] if fork >= FkShanghai: - result = result + (gasFees[fork][GasInitcodeWord] * tx.payload.len) + result = result + (gasFees[fork][GasInitcodeWord] * tx.payload.len.wordCount) if tx.txType > TxLegacy: result = result + tx.accessList.len * ACCESS_LIST_ADDRESS_COST