fuels-rs
fuels-rs copied to clipboard
feat: make configurable max_fee_estimation_tolerance in call handlers
Closes #1591
Release notes
In this release, we:
- Added a possibility to configure max_fee_estimation_tolerance in
CallHandler,TransactionTunerandExecutable
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_toleranceacross call handlers, transaction builders, and loader blob uploads, with tests.
- SDK - Calls:
CallHandler:
- Add field
max_fee_estimation_tolerancewith builderwith_max_fee_estimation_tolerance(...).- Propagate tolerance into
transaction_builder_with_parametersand builder creation.TransactionTuner(trait and impls):
- Extend
transaction_builder(...)signature to acceptmax_fee_estimation_tolerance: f32.ScriptCall/ContractCall/Vec<ContractCall>pass tolerance toScriptTransactionBuilder.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_blobdelegates to it.- Use tolerance in
BlobTransactionBuilder.with_max_fee_estimation_tolerance(...).- Tests:
- Add
test_max_fee_estimation_toleranceine2e/tests/contracts.rsvalidating default and custom tolerances.Written by Cursor Bugbot for commit e0c5d84738db573aaf4a544a5f79e97a35adb524. This will update automatically on new commits. Configure here.
Thanks for the contribution! Before we can merge this, we need @grandima to sign the Fuel Labs Contributor License Agreement.
@segfault-magnet please review.