You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const predicate = new Predicate(bin, abi, provider);
return predicate;
}
We should be able to infer from the ABI that the predicate contains configurable constants and the types of them, and provide a way for them to be easily passed to the factory instance. This could be done by amending the createInstance signature should configurables be present.
The text was updated successfully, but these errors were encountered:
Fantastic, this is the issue I said I'd pick up yesterday on the sync, but you're more than welcome to do it yourself! ⚡
Predicates, Scripts, and Contracts will be practically the same. Since the code sharing between them should be prevalent, the three might fit in a single PR. Do you want to do all three?
I suspect we will end up with something like this:
Now that predicates support configurable constants in #998, we should look to support them in typegen.
Predicates with configurable constants are instantiated like so:
fuels-ts/packages/fuel-gauge/src/predicate-with-configurable.test.ts
Line 77 in 28c1cda
However the autogenerated predicate factory created using typegen doesn't offer any way of passing configurables:
fuels-ts/packages/abi-typegen/src/templates/predicate/factory.hbs
Lines 49 to 62 in 28c1cda
We should be able to infer from the ABI that the predicate contains configurable constants and the types of them, and provide a way for them to be easily passed to the factory instance. This could be done by amending the
createInstance
signature should configurables be present.The text was updated successfully, but these errors were encountered: