Closed nedsalk closed 2 months ago
@nedsalk, in more complex sway programs using Option<x>
, does this still happen?
@mvares the current behaviour is outlined here
Typegen generates the function type
optional_input: InvokeFunction<[input: Option<BigNumberish>], number>;
Please note, I've started the work for this already :)
For a simple sway program:
Typegen generates the function type
which mandates providing an input even though it's optional in sway. The generated type should be
Note that this might become tricky once multiple inputs are introduced where some are optional and some are not, akin to what is mentioned in #2148.