From 612d2819bbedddac567be056f5ab2ebbfe94d028 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Wed, 2 Oct 2024 21:32:05 +0700 Subject: [PATCH] internal/ethapi: set dynamic fee fields to 0 in access list so that setting NoBaseFee will disable subsequent validation --- internal/ethapi/api.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index a502952893..8f3f378ce1 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1631,6 +1631,12 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH if err := args.setDefaults(ctx, b, true); err != nil { return nil, 0, nil, err } + + // Set dynamic fee fields to 0 to avoid validation checks during execution. + // These are irrelevant to calculation of access lists and gas cost. + args.MaxFeePerGas = new(hexutil.Big) + args.MaxPriorityFeePerGas = new(hexutil.Big) + var to common.Address if args.To != nil { to = *args.To