From 5fce58e5b2b4427e2a0785b90d5edef0ef4413c3 Mon Sep 17 00:00:00 2001 From: Jared Wasinger Date: Wed, 2 Oct 2024 22:09:07 +0700 Subject: [PATCH] try using CallDefaults instead of setDefaults (AccessList is an eth_call-like operation) --- internal/ethapi/api.go | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 8f3f378ce1..2025d47b88 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -1627,15 +1627,8 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH return nil, 0, nil, err } - // Ensure any missing fields are filled, extract the recipient and input data - 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) + blockCtx := core.NewEVMBlockContext(header, NewChainContext(ctx, b), nil) + args.CallDefaults(b.RPCGasCap(), blockCtx.BaseFee, b.ChainConfig().ChainID) var to common.Address if args.To != nil {