Running `fuels typegen` command generates different contract factories each run

Versions used:

  • fuels - 0.94.1
  • toolchain channel latest-aarch64-apple-darwin (and tried with nightly-2024-08-27)
  • forc - 0.63.1
  • fuel-core - 0.34.0

The expected behavior is that the output of the typegen command should remain unchanged, provided that no modifications were made to the contracts’ abis.

2 Likes

Thanks for sharing @martines3000, will make sure that the team looks into it

@martines3000 Can you please provide a minimal contract and the commands you’re using so we can use them as a reproduction?

I noticed the issue in this repository: pyth-crosschain/target_chains/fuel/contracts at main · pyth-network/pyth-crosschain · GitHub

I tested it with our contracts (the repository is currently private) and I had the same problem.
@Nazeeh21 Also tested it and had the same problem in the Pyth repository and I shared the abi and bin files of our contract with him on Telegram.

I prepared the most basic example here: GitHub - martines3000/fuel-ts-typegen-bug-repro

I hope it helps.

Hey @martines3000 :wave:

Thanks for the reproduction - I can see the issue you’re experiencing and identified a solution for this.

Will post back with progress.

1 Like

Awesome, thank you for the quick help. :100:

Tracking the issue here :slight_smile:

3 Likes

Hey @martines3000 :wave:

We’ve merged a fix for this issue now.

We’ll be looking to releasing this later today. You can use the next tag of fuels if this is a blocker for you in the meantime :slight_smile:

2 Likes

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.