-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Error provider.getBlock in ethers v5, working in v4 #711
Comments
I’ll investigate this immediately once I get to Starbucks for the day. It may be relate to some of the refactoring of the FallbackProvider I’ve been working on... :s |
Okay, this was pretty quick response :P |
Looks like it is probably PoA related (difficulty is null), I need to figure out why the Kovan tests didn’t detect this... |
Sorry for the delay, I forgot I had prior engagements today, but I'm looking at this now and have reproduced it... |
Ok...Found the problem; it had nothing to do with the other changes... Just that time moved forward. :) The test cases I have from Kovan are from early on when the difficulty was quite low and fit in a 53-bit number. Not that it is over 53-bits, it is no longer fits. The ethers API specifies that difficulty over 53-bits gets converted to null (this is only relevant for PoA networks, where the difficulty does not have any significant meaning anyways). So, I've made the parser check for null difficulty before trying to parse it and added your block as a test case to the test suite, so this should be caught before being published next time. I have 2 or 3 other small things I'm going to look into first, but I should be publishing this to npm within a hour or so and will keep this issue updated. Thanks for your patience! :) |
This should be fixed now in the npm version, |
Thank you, it's now working :) |
Getting error in ethers 5.0 while it works in 4.0,
Tried it for
homestead
seems to be working for that.The text was updated successfully, but these errors were encountered: