-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
getBlock()
returns difficulty null
#3136
Comments
getBlock() Fine too bud. async function f_lookupGetBlockDiff( _blockno ){
provider = new ethers.providers.Web3Provider( window.ethereum );
const blockNo = await provider.getBlock( _blockno );
return blockNo.difficulty;
}
f_lookupGetBlockDiff(100004); |
Has this suddenly and magically been fixed, because I did also return a null like ayushch80 for 15077324 originally |
@Ancientzero |
i made some calculations and found that we are getting |
The In v6, difficulty is a BigInt. See #2036 for more details. Make sense? |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
Ethers Version
5.2
Search Terms
Blocks Methods, Providers
Describe the Problem
getBlock()
andgetBlockWithTransactions()
are returningdifficulty : null
but if I tried same code snippet from your documentation https://docs.ethers.io/v5/api/providers/provider/#Provider-getBlock it returns correctdifficulty: 3849295379889
Code Snippet
Contract ABI
No response
Errors
No response
Environment
Ethereum (mainnet/ropsten/rinkeby/goerli), Browser (Chrome, Safari, etc)
Environment (Other)
No response
The text was updated successfully, but these errors were encountered: