Open ypcat opened 1 month ago
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 ([]).
strings.Split
https://github.com/gochain/web3/blob/c84726a6a7ac1fc9579184bc6fe6e3297ef4c9fe/web3.go#L462-L469
I can submit a PR if needed.
Thanks.
PR welcome.
Sent PR at https://github.com/gochain/web3/pull/295
Hi,
I found when calling contract from cli with empty array input would cause this error:
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.