Comments (9)
Could you elaborate on this?
from etherscan-api.
I see the current version working as expected.
Is there a specific reason for this modification?
from etherscan-api.
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.
I'm very sorry, the header of an issue could misguide you.
from etherscan-api.
@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.
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.
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.
You are very kind. :D
from etherscan-api.
I am closing this.
Feel free to reopen this issue if the bug persists.
from etherscan-api.
Related Issues (20)
- Asset Holder
- Allow for an empty contract in ERC20Transfers function HOT 2
- ERC721็ฉๅไบคๆ่ฎฐๅฝๆฅ่ฏข HOT 1
- CI Failed
- method ERC20Transfers also need desc param HOT 1
- proxy methods not implemented HOT 5
- Add Support for Querying BlockNumber by Timestamp
- Etherscan api can return the string "0_0" as the traceId for InternalTx requests HOT 2
- Add Support for Retrieving ETH Transaction Receipt HOT 4
- CI: httputil.DumpResponse() is unstable under go 1.17.3 and HTTP/2
- Bsc Pro Endpoints
- Add Support for Logs endpoint HOT 1
- wsarecv error HOT 7
- gas-tracker api HOT 3
- consider update ContractSource HOT 1
- Error handling ERC-1155 HOT 8
- Is there a way to get only income transaction to an address using etherscan a.k.a this library? HOT 1
- etherScanClient.ERC20Transfers unmarshal error HOT 13
- Add 'methodId' field to NormalTx structure HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from etherscan-api.