|
|
|
@ -453,7 +453,7 @@ func (s *PersonalAccountAPI) signTransaction(ctx context.Context, args *Transact |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
// Set some sanity defaults and terminate on failure
|
|
|
|
|
if err := args.setDefaults(ctx, s.b); err != nil { |
|
|
|
|
if err := args.setDefaults(ctx, s.b, false); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
// Assemble the transaction and sign with the wallet
|
|
|
|
@ -1093,14 +1093,14 @@ func doCall(ctx context.Context, b Backend, args TransactionArgs, state *state.S |
|
|
|
|
defer cancel() |
|
|
|
|
|
|
|
|
|
// Get a new instance of the EVM.
|
|
|
|
|
msg, err := args.ToMessage(globalGasCap, header.BaseFee) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
blockCtx := core.NewEVMBlockContext(header, NewChainContext(ctx, b), nil) |
|
|
|
|
if blockOverrides != nil { |
|
|
|
|
blockOverrides.Apply(&blockCtx) |
|
|
|
|
} |
|
|
|
|
msg, err := args.ToMessage(globalGasCap, blockCtx.BaseFee) |
|
|
|
|
if err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
evm := b.GetEVM(ctx, msg, state, header, &vm.Config{NoBaseFee: true}, &blockCtx) |
|
|
|
|
|
|
|
|
|
// Wait for the context to be done and cancel the evm. Even if the
|
|
|
|
@ -1485,14 +1485,9 @@ func AccessList(ctx context.Context, b Backend, blockNrOrHash rpc.BlockNumberOrH |
|
|
|
|
if db == nil || err != nil { |
|
|
|
|
return nil, 0, nil, err |
|
|
|
|
} |
|
|
|
|
// If the gas amount is not set, default to RPC gas cap.
|
|
|
|
|
if args.Gas == nil { |
|
|
|
|
tmp := hexutil.Uint64(b.RPCGasCap()) |
|
|
|
|
args.Gas = &tmp |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Ensure any missing fields are filled, extract the recipient and input data
|
|
|
|
|
if err := args.setDefaults(ctx, b); err != nil { |
|
|
|
|
if err := args.setDefaults(ctx, b, true); err != nil { |
|
|
|
|
return nil, 0, nil, err |
|
|
|
|
} |
|
|
|
|
var to common.Address |
|
|
|
@ -1795,7 +1790,7 @@ func (s *TransactionAPI) SendTransaction(ctx context.Context, args TransactionAr |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// Set some sanity defaults and terminate on failure
|
|
|
|
|
if err := args.setDefaults(ctx, s.b); err != nil { |
|
|
|
|
if err := args.setDefaults(ctx, s.b, false); err != nil { |
|
|
|
|
return common.Hash{}, err |
|
|
|
|
} |
|
|
|
|
// Assemble the transaction and sign with the wallet
|
|
|
|
@ -1815,7 +1810,7 @@ func (s *TransactionAPI) FillTransaction(ctx context.Context, args TransactionAr |
|
|
|
|
args.blobSidecarAllowed = true |
|
|
|
|
|
|
|
|
|
// Set some sanity defaults and terminate on failure
|
|
|
|
|
if err := args.setDefaults(ctx, s.b); err != nil { |
|
|
|
|
if err := args.setDefaults(ctx, s.b, false); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
// Assemble the transaction and obtain rlp
|
|
|
|
@ -1884,7 +1879,7 @@ func (s *TransactionAPI) SignTransaction(ctx context.Context, args TransactionAr |
|
|
|
|
if args.Nonce == nil { |
|
|
|
|
return nil, errors.New("nonce not specified") |
|
|
|
|
} |
|
|
|
|
if err := args.setDefaults(ctx, s.b); err != nil { |
|
|
|
|
if err := args.setDefaults(ctx, s.b, false); err != nil { |
|
|
|
|
return nil, err |
|
|
|
|
} |
|
|
|
|
// Before actually sign the transaction, ensure the transaction fee is reasonable.
|
|
|
|
@ -1933,7 +1928,7 @@ func (s *TransactionAPI) Resend(ctx context.Context, sendArgs TransactionArgs, g |
|
|
|
|
if sendArgs.Nonce == nil { |
|
|
|
|
return common.Hash{}, errors.New("missing transaction nonce in transaction spec") |
|
|
|
|
} |
|
|
|
|
if err := sendArgs.setDefaults(ctx, s.b); err != nil { |
|
|
|
|
if err := sendArgs.setDefaults(ctx, s.b, false); err != nil { |
|
|
|
|
return common.Hash{}, err |
|
|
|
|
} |
|
|
|
|
matchTx := sendArgs.toTransaction() |
|
|
|
|