From 8dbab7bf3e77f8d6fdc44818cbe28419f1b635bf Mon Sep 17 00:00:00 2001 From: Tanishq Jasoria Date: Tue, 3 Sep 2024 13:00:51 +0300 Subject: [PATCH] use correct address --- core/vm/operations_verkle.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/vm/operations_verkle.go b/core/vm/operations_verkle.go index d748698c6b5c..6d7d921d4d41 100644 --- a/core/vm/operations_verkle.go +++ b/core/vm/operations_verkle.go @@ -77,10 +77,11 @@ func makeCallVariantGasEIP4762(oldCalculator gasFunc) gasFunc { if err != nil { return 0, err } - if _, isPrecompile := evm.precompile(contract.Address()); isPrecompile { + target := common.Address(stack.Back(1).Bytes20()) + if _, isPrecompile := evm.precompile(target); isPrecompile { return gas, nil } - wgas := evm.Accesses.TouchAndChargeMessageCall(contract.Address().Bytes()) + wgas := evm.Accesses.TouchAndChargeMessageCall(target.Bytes()) if wgas == 0 { wgas = params.WarmStorageReadCostEIP2929 }