Skip to content

docs: improve documentation for predicates and gas price estimation#3961

Open
airope wants to merge 1 commit intoFuelLabs:masterfrom
airope:docs/predicates-gas-estimation
Open

docs: improve documentation for predicates and gas price estimation#3961
airope wants to merge 1 commit intoFuelLabs:masterfrom
airope:docs/predicates-gas-estimation

Conversation

@airope
Copy link

@airope airope commented Mar 3, 2026

Summary

Closes #3677

Adds documentation for estimatePredicates, estimateGasPrice, and estimatePredicatesAndGasPrice methods to the existing Modifying the Request guide.

Changes

  • Added three new sections to modifying-the-request.md:
    • Estimating Gas Price — explains provider.estimateGasPrice() and the blockHorizon parameter
    • Estimating Predicates Gas Usage — explains provider.estimatePredicates() for populating predicateGasUsed on predicate inputs
    • Estimating Predicates and Gas Price Together — explains the combined provider.estimatePredicatesAndGasPrice() method
  • Added code snippet file with working examples for all three methods
  • References assembleTx guide for the recommended high-level approach

@cursor
Copy link

cursor bot commented Mar 3, 2026

PR Summary

Low Risk
Low risk documentation-only change; main risk is snippet or API usage drifting from actual SDK behavior.

Overview
Adds new guidance to modifying-the-request.md covering Provider.estimateGasPrice, Provider.estimatePredicates, and Provider.estimatePredicatesAndGasPrice, including notes on blockHorizon, predicate predicateGasUsed, and when assembleTx already handles these.

Introduces a new runnable snippet demonstrating funding a predicate, adding predicate resources to a ScriptTransactionRequest, and calling the three estimation methods. Also updates .gitignore to ignore the .claude/ directory.

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

@github-actions github-actions bot added the docs Requests pertinent to documentation label Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla:signed docs Requests pertinent to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Documentation Around Predicates and Gas Price Estimation

1 participant