fix!: avoid add witnesses for predicates
- Close: https://github.com/FuelLabs/fuels-ts/issues/2029
Breaking Changes:
-
TransactionRequest.addPredicateResourceswas removed
✨ A PR has been created under the rc-2037 tag on fuels-wallet repo.
https://github.com/FuelLabs/fuels-wallet/pull/1265
I am holding this until the fix https://github.com/FuelLabs/fuels-ts/pull/2262 is released.
I am unsure if the changes here will be reflected in more required updates on the PR that will upgrade https://github.com/FuelLabs/fuel-connectors to use the latest fuels version
Nice one 🧙🏻
One thing that I like that they do in the RS SDK, is they will add funding / set gas limits to the exact amount required by the tx. So rather than an increase from
1000>2000, it would be increased to (ex.1432). Then if we have a fail due to an increase in consumption, we can actually validate that it should have increased. Thoughts?
@danielbate I've failed to understand what you mean mate. Are you talking about adding tests to validate that a TX has consumed the amount of gas it was supposed to consume? And throw an error if they do consume a different value?
Coverage Report:
| Lines | Branches | Functions | Statements |
|---|---|---|---|
| 79.66%(-0.14%) | 69.79%(+0.16%) | 77.6%(-0.23%) | 79.76%(-0.15%) |
Changed Files:
| Ok | File (✨=New File) | Lines | Branches | Functions | Statements |
|---|---|---|---|---|---|
| 🔴 | packages/account/src/predicate/predicate.ts | 22.38% (-7.03%) |
31.25% (-7.21%) |
12.5% (-4.16%) |
21.42% (-7.42%) |
| 🔴 | packages/account/src/providers/provider.ts | 68.16% (+0%) |
55.97% (+0.63%) |
77.1% (+0%) |
68.39% (+0%) |
| 🔴 | packages/account/src/providers/transaction-request/transaction-request.ts | 85.51% (-3.06%) |
72.83% (-1.85%) |
86.53% (-5.3%) |
85.9% (-2.98%) |
| 🔴 | packages/account/src/providers/transaction-request/utils.ts | 87.5% (+27.5%) |
85.71% (+45.71%) |
100% (+33.34%) |
87.5% (+27.5%) |
| 🔴 | packages/account/src/test-utils/seedTestWallet.ts | 100% (+0%) |
60% (+10%) |
100% (+0%) |
100% (+0%) |