From f2a0819a328163c66964ae0ac54ce68886d4b34b Mon Sep 17 00:00:00 2001 From: Daniel Liu Date: Tue, 28 May 2024 15:47:15 +0800 Subject: [PATCH] internal/ethapi: fix panic in access list creation (#23133) --- internal/ethapi/api.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 2efa29610b9a..c8c63b710712 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -2038,11 +2038,11 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH if value, ok := feeCapacity[to]; ok { balanceTokenFee = value } - msg := types.NewMessage(args.from(), args.To, uint64(*args.Nonce), args.Value.ToInt(), uint64(*args.Gas), args.GasPrice.ToInt(), nil, nil, args.data(), accessList, false, balanceTokenFee, header.Number) + msg := types.NewMessage(args.from(), args.To, uint64(*args.Nonce), args.Value.ToInt(), uint64(*args.Gas), args.GasPrice.ToInt(), big.NewInt(0), big.NewInt(0), args.data(), accessList, false, balanceTokenFee, header.Number) // Apply the transaction with the access list tracer tracer := vm.NewAccessListTracer(accessList, args.from(), to, precompiles) - config := vm.Config{Tracer: tracer, Debug: true} + config := vm.Config{Tracer: tracer, Debug: true, NoBaseFee: true} vmenv, _, err := b.GetEVM(ctx, msg, statedb, XDCxState, header, &config) if err != nil { return nil, 0, nil, err