-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optimize estimateTxDependencies
method
#1763
Comments
Related (same?): |
Does this still need to be fixed after #1767 ? |
@Dhaiwat10 If I am not mistaken, for this one we are waiting for a possible update on |
@Torres-ssf Did we communicate this need to someone? Ideally, we should mark this issue as blocked and add a link here to another issue on the |
@arboleya @Dhaiwat10 I reckon this issue is blocked by FuelLabs/fuel-vm#691 It seems the plan to implement this is only after mainnet. |
That was the missing issue, then. Thanks for pointing that out. |
Based on the issue's proposed changes (specifically "Discontinue automatic addition of
We can already make dependency estimation and opt-in thing, it'd just break the apps of our consumers that didn't specify the appropriate outputs. |
@nedsalk This is blocked. The desired behavior, as outlined in this issue, is for the dry-run to indicate the number of variable outputs required for the transaction to be processed. Implementing this feature will eliminate the need for multiple dry-runs to determine the necessary outputs. We cannot expect users to always provide the correct number of variable outputs, especially for complex transactions involving multiple parties ( wallet connectors ). |
The
estimateTxDependencies
automates the addition of missing OutputVariables, essential for Sway's transfer or mint functions.With this, users don't need to specify the
variableOutputs
parameter:Warning
While providing a nice DX, this approach may lead to multiple dry-run calls, potentially slowing down the transaction execution and representing more use of resources, which translates into more costs.
How it works:
Revert
withval
equal toTransferToAddressFailed
. This error indicates a missingOutputVariable
.Revert
receipt is detected, anOutputVariable
is added, and another dry run is executed. This loop continues until no related revert receipt is found.Consider a contract call minting assets to 3 addresses:
Outcome:
OutputVariable
Proposed change:
OutputVariable
OutputVariable
in the SDK documentation.OutputVariable
is missingRelated:
Variable Outputs
documentation page #925The text was updated successfully, but these errors were encountered: