Giter Site home page Giter Site logo

Comments (9)

nanmu42 avatar nanmu42 commented on June 18, 2024

Could you elaborate on this?

from etherscan-api.

nanmu42 avatar nanmu42 commented on June 18, 2024

I see the current version working as expected.

Is there a specific reason for this modification?

from etherscan-api.

evd0kim avatar evd0kim commented on June 18, 2024

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.

from etherscan-api.

evd0kim avatar evd0kim commented on June 18, 2024

I'm very sorry, the header of an issue could misguide you.

from etherscan-api.

evd0kim avatar evd0kim commented on June 18, 2024

@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?

from etherscan-api.

nanmu42 avatar nanmu42 commented on June 18, 2024

Thank you for finding this bug. ๐Ÿป

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.

from etherscan-api.

evd0kim avatar evd0kim commented on June 18, 2024

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.

from etherscan-api.

nanmu42 avatar nanmu42 commented on June 18, 2024

You are very kind. :D

from etherscan-api.

nanmu42 avatar nanmu42 commented on June 18, 2024

I am closing this.

Feel free to reopen this issue if the bug persists.

from etherscan-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.