Closed emergent-reasons closed 1 month ago
Just made a commit to the @next
branch to improve the error message to provide more info 👍
Now it returns the error in this format:
Incorrect number of arguments passed to function spend. Expected 2 arguments (pubkey,sig) but got 0
Note that this is not exactly the suggested format as it's not trivial to return the provided types (because the provided types would be JS types instead of CashScript types).
I think we can close this old issue now, should it come up again we can reopen it 😄
Looks great!
Example:
Incorrect number of arguments passed to AnyHedge_v0_11 constructor
Would be nice to have
Expected x arguments for y constructor but got z
or
X unexpected arguments and Y missing arguments passed to ... constructor
or any format that works.