Cant create predicate instance following Use type tutorial in ts sdk

Hey devs!
I have tried to create instance of predicate with following code, but it failed, please have a look)

Link to tutorial that used - Using Generated Types | Fuels-ts
Link to my repo with code - GitHub - compolabs/test-predicate-ts

Follow-up PR:

Fixed in fuels@ 0.41.0.

1 Like

Works for me with fuels 0.41.0!

If someone else has issues with the command that uses yarn exec .... (following the tutorial), for me it works with npx fuels typegen -i xx/xx-abi.json -o ./src/types.

I do get another issue now; following the code in Generating Types from ABI | Fuels-ts doesn’t seem to work.

For example setData and getBalance are no existing methods on predicate.

Is there a tutorial that can be followed?

actually, setData and getBalance do exist, the correct generation needed a --predicate at the end which I didn’t do:
npx fuels typegen -i xx/xx-abi.json -o ./src/types --predicate

1 Like

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