Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: getLogs() fails at Formatter due to invalid BigNumber string (v5.0.17) #1104

Closed
kaiansaari opened this issue Oct 15, 2020 · 4 comments
Closed
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.

Comments

@kaiansaari
Copy link

kaiansaari commented Oct 15, 2020

getLogs() is failing at formatting due to the error below (nodejs)

const provider = new ethers.providers.EtherscanProvider('kovan',YOURAPIKEY)

await provider.getLogs({address: YOURCONTRACT, topics:['0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef']})
    at Logger.makeError (F:\dev\runebridge\node_modules\@ethersproject\logger\lib\index.js:179:21)
    at Logger.throwError (F:\dev\runebridge\node_modules\@ethersproject\logger\lib\index.js:188:20)
    at Logger.throwArgumentError (F:\dev\runebridge\node_modules\@ethersproject\logger\lib\index.js:191:21)      
    at Function.BigNumber.from (F:\dev\runebridge\node_modules\@ethersproject\bignumber\lib\bignumber.js:174:27) 
    at Formatter.number (F:\dev\runebridge\node_modules\@ethersproject\providers\lib\formatter.js:121:38)        
    at Function.Formatter.check (F:\dev\runebridge\node_modules\@ethersproject\providers\lib\formatter.js:342:40)
    at Formatter.filterLog (F:\dev\runebridge\node_modules\@ethersproject\providers\lib\formatter.js:336:26)     
    at Array.forEach (<anonymous>)
    at F:\dev\runebridge\node_modules\@ethersproject\providers\lib\formatter.js:380:19 {
  reason: 'invalid BigNumber string',
  code: 'INVALID_ARGUMENT',
  argument: 'value',
  value: '0x',
  checkKey: 'transactionIndex',
  checkValue: '0x'```
@kaiansaari kaiansaari changed the title Bug: getLogs() fails at Formatter due to invalid BigNumber string Bug: getLogs() fails at Formatter due to invalid BigNumber string (v5.0.8) Oct 15, 2020
@kaiansaari kaiansaari changed the title Bug: getLogs() fails at Formatter due to invalid BigNumber string (v5.0.8) Bug: getLogs() fails at Formatter due to invalid BigNumber string (v5.0.17) Oct 15, 2020
@ricmoo
Copy link
Member

ricmoo commented Oct 15, 2020

Can you provide an example address for your query above?

@ricmoo ricmoo added the investigate Under investigation and may be a bug. label Oct 15, 2020
@kaiansaari
Copy link
Author

Sure, try 0xE4Ae305ebE1AbE663f261Bc00534067C80ad677C

@ricmoo
Copy link
Member

ricmoo commented Oct 23, 2020

I've fixed this in 5.0.19. Let me know if you have any issues with it. :)

@ricmoo ricmoo added bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published. and removed investigate Under investigation and may be a bug. labels Oct 23, 2020
@kaiansaari
Copy link
Author

Thanks @ricmoo !

@ricmoo ricmoo closed this as completed Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified to be an issue. fixed/complete This Bug is fixed or Enhancement is complete and published.
Projects
None yet
Development

No branches or pull requests

2 participants