|
|
@ -100,7 +100,7 @@ func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend, skipGas |
|
|
|
if err := args.setBlobTxSidecar(ctx); err != nil { |
|
|
|
if err := args.setBlobTxSidecar(ctx); err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
if err := args.setFeeDefaults(ctx, b); err != nil { |
|
|
|
if err := args.setFeeDefaults(ctx, b, b.CurrentHeader()); err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -183,8 +183,7 @@ func (args *TransactionArgs) setDefaults(ctx context.Context, b Backend, skipGas |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// setFeeDefaults fills in default fee values for unspecified tx fields.
|
|
|
|
// setFeeDefaults fills in default fee values for unspecified tx fields.
|
|
|
|
func (args *TransactionArgs) setFeeDefaults(ctx context.Context, b Backend) error { |
|
|
|
func (args *TransactionArgs) setFeeDefaults(ctx context.Context, b Backend, head *types.Header) error { |
|
|
|
head := b.CurrentHeader() |
|
|
|
|
|
|
|
// Sanity check the EIP-4844 fee parameters.
|
|
|
|
// Sanity check the EIP-4844 fee parameters.
|
|
|
|
if args.BlobFeeCap != nil && args.BlobFeeCap.ToInt().Sign() == 0 { |
|
|
|
if args.BlobFeeCap != nil && args.BlobFeeCap.ToInt().Sign() == 0 { |
|
|
|
return errors.New("maxFeePerBlobGas, if specified, must be non-zero") |
|
|
|
return errors.New("maxFeePerBlobGas, if specified, must be non-zero") |
|
|
|