fuels-rs icon indicating copy to clipboard operation
fuels-rs copied to clipboard

feat: make configurable max_fee_estimation_tolerance in call handlers

Open grandima opened this issue 7 months ago • 2 comments

Closes #1591

Release notes

In this release, we:

  • Added a possibility to configure max_fee_estimation_tolerance in CallHandler, TransactionTuner and Executable

Checklist

  • [x] All changes are covered by tests (or not applicable)
  • [x] All changes are documented (or not applicable)
  • [x] I reviewed the entire PR myself (preferably, on GH UI)
  • [x] I described all Breaking Changes (or there's none)

[!NOTE] Adds a configurable max_fee_estimation_tolerance across call handlers, transaction builders, and loader blob uploads, with tests.

  • SDK - Calls:
    • CallHandler:
      • Add field max_fee_estimation_tolerance with builder with_max_fee_estimation_tolerance(...).
      • Propagate tolerance into transaction_builder_with_parameters and builder creation.
    • TransactionTuner (trait and impls):
      • Extend transaction_builder(...) signature to accept max_fee_estimation_tolerance: f32.
      • ScriptCall/ContractCall/Vec<ContractCall> pass tolerance to ScriptTransactionBuilder.with_max_fee_estimation_tolerance(...).
    • calls/utils.rs:
      • transaction_builder_from_contract_calls(...) now takes tolerance and forwards it to the builder.
  • SDK - Executable:
    • Add upload_blob_with_tolerance(account, max_fee_estimation_tolerance); upload_blob delegates to it.
    • Use tolerance in BlobTransactionBuilder.with_max_fee_estimation_tolerance(...).
  • Tests:
    • Add test_max_fee_estimation_tolerance in e2e/tests/contracts.rs validating default and custom tolerances.

Written by Cursor Bugbot for commit e0c5d84738db573aaf4a544a5f79e97a35adb524. This will update automatically on new commits. Configure here.

grandima avatar May 16 '25 16:05 grandima

Thanks for the contribution! Before we can merge this, we need @grandima to sign the Fuel Labs Contributor License Agreement.

fuel-cla-bot[bot] avatar May 16 '25 16:05 fuel-cla-bot[bot]

@segfault-magnet please review.

grandima avatar Oct 31 '25 13:10 grandima