fuels-ts icon indicating copy to clipboard operation
fuels-ts copied to clipboard

fix!: avoid add witnesses for predicates

Open Torres-ssf opened this issue 1 year ago • 3 comments

  • Close: https://github.com/FuelLabs/fuels-ts/issues/2029

Breaking Changes:

  • TransactionRequest.addPredicateResources was removed

Torres-ssf avatar Apr 11 '24 01:04 Torres-ssf

✨ A PR has been created under the rc-2037 tag on fuels-wallet repo. https://github.com/FuelLabs/fuels-wallet/pull/1265

fuel-service-user avatar Apr 11 '24 02:04 fuel-service-user

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

Torres-ssf avatar May 08 '24 15:05 Torres-ssf

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?

Torres-ssf avatar May 10 '24 14:05 Torres-ssf

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%)

github-actions[bot] avatar May 10 '24 18:05 github-actions[bot]