Closed Torres-ssf closed 2 months ago
✨ A PR has been created under the rc-2597
tag on fuels-wallet
repo.
https://github.com/FuelLabs/fuels-wallet/pull/1393
Do you think it's worthwhile using Typegen consistently in our documentation - over using
ContractFactory
(example)?(This can be a separate issue - just posing the question)
@petertonysmith94 Good question. Since both approaches are valid we should have examples for each one. But at the same time, I think that having 2 different approaches can be confusing for new users. What do you think?
@petertonysmith94 @Torres-ssf just weighing in that I would love to see us favouring Typegen consistently for fuel-gauge
and snippets as it's essential for browser testing, and for users sake. I've added it as a requirement to #1820. Then we could have contract factory having it's own doc snippet.
@Torres-ssf I think we need to be consistent using one or the other, I'd favour typegen as it provides the best experience for end users.
As @danielbate said - I think a section on using a ContractFactory
would be worthwhile, but I reckon it should be isolate document 😄
@danielbate @petertonysmith94 I lost a bit of context here, but I'd say we should use the fuels
CLI instead, which internally will use typegen
anyway. This will close the cycle of dogfooding our stuff in our test suites as much as possible.
I'd say we should use the fuels CLI instead, which internally will use typegen anyway
@arboleya agreed. Right now we are building with the fuels CLI, so like we do in a few places in fuel-gauge
, I would like to see us utilising those factories rather than importing the ContractFactory
.
Coverage Report:
Lines | Branches | Functions | Statements |
---|---|---|---|
79.66%(+0.04%) | 71.4%(+0%) | 77.33%(+0.05%) | 79.75%(+0.04%) |
Release notes
In this release, we:
deployContract
method a non-blocking callSummary
This PR refactors the
deployContract
method to be non-blocking. As a result, the method no longer returns the contract instance directly. Instead, it returns an object containing thetransactionId
and awaitForResult
function. This change improves the flexibility and control over contract deployment but introduces a breaking change that requires updates to existing implementations.Breaking Changes
The
deployContract
method no longer returns the contract instance directly. Instead, it returns an object containing thetransactionId
, thecontractId
, and awaitForResult
function.Checklist
tests
to prove my changesdocs