runtypes icon indicating copy to clipboard operation
runtypes copied to clipboard

Support Optional Parameters For Contracts

Open sylvanaar opened this issue 3 years ago • 1 comments

Contracts do not allow variable number of parameters due to a length check which looks like it may just be to prevent an out of bounds condition in the next loop.

An implementation would allow the looping over parameters to continue past the number use at the call site, and would supply undefined to any remaining Runtype.check() calls

sylvanaar avatar Aug 30 '20 19:08 sylvanaar

I can't imagine this would be implemented in a neat way. Could you pick some ideas how the API would look like?

yuhr avatar Mar 29 '21 08:03 yuhr