web3
web3 copied to clipboard
invalid hex address on empty input array
Hi,
I found when calling contract from cli with empty array input would cause this error:
ERROR: Error calling constant function: invalid hex address:
I think the root cause should be that strings.Split
on empty string results in a slice with one empty string ([""]) instead of 0-length ([]).
https://github.com/gochain/web3/blob/c84726a6a7ac1fc9579184bc6fe6e3297ef4c9fe/web3.go#L462-L469
I can submit a PR if needed.
Thanks.