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

✨ Added getBlockNumber() method to BaseProvider #125

Merged
merged 7 commits into from
May 19, 2022

Conversation

arimgibson
Copy link
Contributor

Closes #93

  • Added getBlockNumber() method
  • Added test against ethers
  • Added test against web3.js
  • Added inline documentation

@arimgibson arimgibson requested a review from dawsbot May 19, 2022 08:41
@vercel
Copy link

vercel bot commented May 19, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
essential-eth ✅ Ready (Inspect) Visit Preview May 19, 2022 at 8:55PM (UTC)

@codecov
Copy link

codecov bot commented May 19, 2022

Codecov Report

Merging #125 (7b33b73) into master (1cc8cf0) will increase coverage by 0.04%.
The diff coverage is 100.00%.

❗ Current head 7b33b73 differs from pull request most recent head c481ea1. Consider uploading reports for the commit c481ea1 to get more accurate results

@@            Coverage Diff             @@
##           master     #125      +/-   ##
==========================================
+ Coverage   85.60%   85.65%   +0.04%     
==========================================
  Files          37       37              
  Lines         889      892       +3     
  Branches      258      258              
==========================================
+ Hits          761      764       +3     
  Misses        113      113              
  Partials       15       15              
Impacted Files Coverage Δ
src/classes/utils/fetchers.ts 93.33% <ø> (ø)
src/providers/utils/chains-info.ts 100.00% <ø> (ø)
src/providers/BaseProvider.ts 98.21% <100.00%> (+0.10%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1cc8cf0...c481ea1. Read the comment docs.

* * Identical to [`ethers.provider.getBlockNumber`](https://docs.ethers.io/v5/api/providers/provider/#Provider-getBlockNumber)
* * Identical to [`web3.eth.getBlockNumber`](https://web3js.readthedocs.io/en/v1.7.3/web3-eth.html#getblocknumber)
*
* @returns the number of the most recently mined block
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extra credit would be if we also added @example here. I took care of it 👌

@dawsbot dawsbot merged commit c4d3565 into master May 19, 2022
@dawsbot dawsbot deleted the feature/getBlockNumber branch May 19, 2022 20:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add getBlockNumber() method to JsonRpcProvider
2 participants