Replies: 1 comment
-
Related: |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Transaction dependency estimation via
provider.estimateTxDependencies
is currently done always before a transaction is sent to a node. This causes unnecessary round-trips to the node and strain to the network in cases where this estimation is unnecessary.Instead of calling it on every call, we should make it an opt-in feature in cases where the user actually needs it. For more info on when this is needed, one can refer to the excellent documentation of
fuels-rs
on this topic.Regarding the API,
fuels-rs
uses method chaining because rust allows for this pattern:This API would be great but we'd have to write some questionable
Promise
-related code to allow it:Due to that, I'm more in favor of making it part of the call params:
fuels-rs
supports this for single contract calls, multi-calls, as well as script calls. They did it via a trait calledTxDependencyExtension
.Beta Was this translation helpful? Give feedback.
All reactions