You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We should consider refactoring Provider.getTransactionCost by removing the responsibility of adding fake funds to the TransactionRequest before the dry-run to get the gasUsed.
This change will delegate this task to the caller of getTransactionCost, therefore reducing unnecessary parameter flags.
The current implementation of getTransactionCost handles multiple tasks, including adding fake funds for transaction requests.
By offloading the fake fund's addition to the caller, we can eliminate the need for specific parameter flags associated with the funding step:
resourcesOwner: Represents the Account instance that owns the fake resources and it is also used to validate if it is a predicate, which is required for populating the predicate and predicateData for the fake resources.
quantitiesToContract: This includes the amount and assetId of a coin that could be forwarded to a contract.
The text was updated successfully, but these errors were encountered:
We should consider refactoring Provider.getTransactionCost by removing the responsibility of adding fake funds to the
TransactionRequest
before the dry-run to get thegasUsed
.This change will delegate this task to the caller of
getTransactionCost
, therefore reducing unnecessary parameter flags.The current implementation of
getTransactionCost
handles multiple tasks, including adding fake funds for transaction requests.By offloading the fake fund's addition to the caller, we can eliminate the need for specific parameter flags associated with the funding step:
Account
instance that owns the fake resources and it is also used to validate if it is a predicate, which is required for populating thepredicate
andpredicateData
for the fake resources.amount
andassetId
of a coin that could be forwarded to a contract.The text was updated successfully, but these errors were encountered: