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 #4597

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

phoax
Copy link

@phoax phoax commented Feb 13, 2024

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 plugin to calculate accurate gas price on Linea network
  • Updated getFeeData to pass the transaction data

@phoax phoax changed the title feat: add Linea gas estimation Add support for linea_estimateGas Feb 14, 2024
@ricmoo ricmoo added enhancement New feature or improvement. investigate Under investigation and may be a bug. on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6 labels Feb 28, 2024
@arthur-remy
Copy link

Hey @ricmoo,
Do you have a rough idea when this PR might be reviewed? This would be super useful for users to get cheaper gas price on Linea.
If there's anything we can do to make the review smoother, just let us know. Happy to help out!
Thanks a lot for your time, and for the awesome work you do with ethers.js

@wantedsystem
Copy link

Hi @ricmoo,

I hope you're doing well. I wanted to kindly follow up on our PR regarding the gas price optimization for Linea users. We believe this feature could significantly benefit ethers.js users by facilitating cheaper gas prices.

If there's any additional information or adjustments needed to streamline the review process, please let us know. We're eager to contribute and make any necessary changes to align with the project's standards.

Thank you for your time and the amazing work you do with ethers.js. Looking forward to your feedback

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement. investigate Under investigation and may be a bug. on-deck This Enhancement or Bug is currently being worked on. v6 Issues regarding v6
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants