Skip to content

feat(price_pusher): add gas-price override option for EVM price pusher #2419

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

Merged
merged 4 commits into from
Feb 27, 2025

Conversation

devin-ai-integration[bot]
Copy link
Contributor

Add gas-price override option for EVM price pusher

Summary

This PR adds an optional gas-price argument to the EVM price pusher that allows overriding the gas price received from the RPC via await this.client.getGasPrice().

Changes

  • Added a new gas-price command line option to the EVM price pusher command
  • Updated the EvmPricePusher constructor to accept the new parameter
  • Modified the gas price determination logic to use the provided override value when available

Link to Devin run

https://app.devin.ai/sessions/f9167dfbae7840baae3732610d30d08f

Requested by

user

Copy link

vercel bot commented Feb 26, 2025

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

Name Status Preview Comments Updated (UTC)
api-reference ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2025 1:40pm
proposals ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2025 1:40pm
staking ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 27, 2025 1:40pm
3 Skipped Deployments
Name Status Preview Comments Updated (UTC)
component-library ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2025 1:40pm
entropy-debugger ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2025 1:40pm
insights ⬜️ Ignored (Inspect) Visit Preview Feb 27, 2025 1:40pm

Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add "(aside)" to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

Number(await this.client.getGasPrice());
this.gasPrice !== undefined
? this.gasPrice
: Number(await this.customGasStation?.getCustomGasPrice()) ||
Copy link
Collaborator

Choose a reason for hiding this comment

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

Using || to coalesce zeros is generally considered bad practice since it's surprising and unintuitive.

If I understand the intent of this code correctly, I think this would be better written as:

let gasPrice = this.gasPrice ?? Number(await (this.customGasStation?.getCustomGasPrice() ?? this.client.getGasPrice()));

devin-ai-integration bot and others added 3 commits February 27, 2025 14:30
Co-Authored-By: Ali Behjati <ali@dourolabs.xyz>
Co-Authored-By: Ali Behjati <ali@dourolabs.xyz>
Co-Authored-By: Ali Behjati <ali@dourolabs.xyz>
@ali-behjati ali-behjati merged commit ccd07bc into main Feb 27, 2025
11 checks passed
@ali-behjati ali-behjati deleted the devin/1740577182-add-gas-price-override branch February 27, 2025 14:29
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