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

✨ Add hex number string support to wei converters and estimateGas #127

Merged
merged 8 commits into from
May 21, 2022

Conversation

icepy
Copy link
Contributor

@icepy icepy commented May 21, 2022

#120 and #97 @dawsbot pls code review ~

@vercel
Copy link

vercel bot commented May 21, 2022

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

Name Status Preview Updated
essential-eth ✅ Ready (Inspect) Visit Preview May 21, 2022 at 9:23PM (UTC)

@icepy icepy changed the title ✨ Add hex number string support to wei converters ✨ Add hex number string support to wei converters and estimateGas May 21, 2022
@codecov
Copy link

codecov bot commented May 21, 2022

Codecov Report

Merging #127 (adda4f9) into master (9c0314f) will increase coverage by 0.15%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #127      +/-   ##
==========================================
+ Coverage   85.65%   85.80%   +0.15%     
==========================================
  Files          37       37              
  Lines         892      902      +10     
  Branches      258      259       +1     
==========================================
+ Hits          764      774      +10     
  Misses        113      113              
  Partials       15       15              
Impacted Files Coverage Δ
src/classes/utils/fetchers.ts 93.33% <ø> (ø)
src/index.ts 100.00% <100.00%> (ø)
src/providers/BaseProvider.ts 98.33% <100.00%> (+0.11%) ⬆️
src/utils/wei-to-ether.ts 100.00% <100.00%> (ø)

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 9c0314f...adda4f9. Read the comment docs.

@@ -20,6 +23,12 @@ export class JsonRpcProvider extends BaseProvider {
constructor(rpcUrl = 'https://free-eth-node.com/api/eth') {
super([rpcUrl]);
}

async estimateGas(transaction: Record<string, unknown>): Promise<TinyBig> {
Copy link
Owner

Choose a reason for hiding this comment

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

This should go in base provider instead so that both JsonRpcProvider and FallthroughProvider get it via inheritance

@dawsbot
Copy link
Owner

dawsbot commented May 21, 2022

I'll do the rest @icepy 🙏

@icepy
Copy link
Contributor Author

icepy commented May 22, 2022

I'll do the rest @icepy 🙏

thanks so much @dawsbot

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.

2 participants