Closed evd0kim closed 6 years ago
Could you elaborate on this?
I see the current version working as expected.
Is there a specific reason for this modification?
Hey, Maybe I'm an inexperienced coder in Golang and did something wrong but
ERC20TxList, err := client.ERC20Transfers( nil, &watchAddress, nil, nil, 0, 0)
Didn't work. The reason was this piece pass nil further:
if input == nil {
return
}
The problem initially happened with startBlock/endBlock since you commented about them that they could be equal to nil or something and I later found in etherscan.io documentation about it. I only found a way after that because I was too lazy to write a code which figures out contract addresses.
I'm very sorry, the header of an issue could misguide you.
@nanmu42 I see a link to Golang FAQ. I investigated Golang types a little bit and realized that the problem is in non-nil type value. Do you know another solution to this without reflect?
Thank you for finding this bug. :beers:
The problem should be solved in v1.0.2
. You may close this issue after confirming it is working.
Yes, there is another way, but less DRY -- check for nil in every function like ERC20Transfers()
, so long as it is not passed in an interface, if a == nil
should still work as expected.
That's another way I thought about.
I tried to figure out how to make it work without changing your code at all but it seems there is no way because the compiler doesn't allow to pass nil
type as *string
argument.
Thank you for your work anyway. Nice, clean, small project.
You are very kind. :D
I am closing this.
Feel free to reopen this issue if the bug persists.
They are not pass, if the code in helper.go change to: