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 support for linea_estimateGas #1810

Closed
wants to merge 10 commits into from

Conversation

Julink-eth
Copy link

@Julink-eth Julink-eth commented Feb 14, 2024

PR-Codex overview

Linea, a layer 2 blockchain, supports the Ethereum EIP-1559 gas price model, known for making transaction fees more predictable. Unlike the base Ethereum layer, Linea aims to offer a more stable and cost-effective approach to handling transaction fees. For detailed information, you can visit Linea's Gas Fees Documentation.

To further enhance the efficiency of transaction fee calculations, Linea has introduced a new RPC method designed to provide the best gas price estimates. This new method is documented in detail here.

The introduction of this new RPC method necessitates changes in how web3 libraries calculate gas prices. Traditionally, these libraries used the eth_gasPrice method. Linea's update shifts this approach to utilize the newly introduced linea_estimateGas method.

Detailed summary

  • Added linea_estimateGas RPC method to calculate accurate gas price on Linea network
  • Updated linea and lineaTestnet definitions to override fee calculation using linea_estimateGas
  • Added lineaEstimateGas and lineaEstimateFeesPerGas actions to calculate gas and fees
  • Updated types and imports related to fee calculation on Linea network

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}


PR-Codex overview

This PR enhances Linea chain fee estimation by implementing accurate gas price calculations using RPC method linea_estimateGas.

Detailed summary

  • Added linea and lineaTestnet exports in chains
  • Implemented lineaEstimateGas and lineaEstimateFeesPerGas actions
  • Defined types for Linea gas estimation
  • Updated fee calculation in Linea and LineaTestnet definitions

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

changeset-bot bot commented Feb 14, 2024

🦋 Changeset detected

Latest commit: 707c586

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Feb 14, 2024

@Julink-eth is attempting to deploy a commit to the wevm Team on Vercel.

A member of the Team first needs to authorize it.

@jxom jxom force-pushed the main branch 2 times, most recently from 9a3b050 to ac820b1 Compare February 17, 2024 10:03
@jxom
Copy link
Member

jxom commented Mar 17, 2024

Thanks for the PR! To keep Viem maintainable, we are only accepting extensions from sponsors. This covers initial setup review, due diligence, and ongoing maintenance from the core team so we can keep the quality bar in the Viem repository very high. More info here on sponsoring: https://github.com/sponsors/wevm. Happy to answer any questions or set up time to chat further.

@jxom jxom closed this Mar 17, 2024
@arthur-remy
Copy link

Hello @jxom, thanks for your reply here. Would be great to discuss this further!
Can we have a chat about it? https://calendar.app.google/pvydpn46M9J9zhw28

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.

4 participants