Empty params for encodeInput results in "Error: struct: invalid value undefined"
ai-slave opened this issue · 1 comments
ai-slave commented
When ABI has a function that requires no input and can be used like this .encodeInput()
it actually results in an error:
Error: struct: invalid value undefined
. When you fix it to .encodeInput({})
it works ok.
Took me some time to understand what am i doing wrong here, so if it's ok to tread undefined as an empty object that'd save someone like me some time in the future.
If you think this adds value pls let me do a PR to fix this case.
paulmillr commented
Fixed.