-
Notifications
You must be signed in to change notification settings - Fork 270
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
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
3 Skipped Deployments
|
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
apps/price_pusher/src/evm/evm.ts
Outdated
Number(await this.client.getGasPrice()); | ||
this.gasPrice !== undefined | ||
? this.gasPrice | ||
: Number(await this.customGasStation?.getCustomGasPrice()) || |
There was a problem hiding this comment.
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()));
Co-Authored-By: Ali Behjati <ali@dourolabs.xyz>
Co-Authored-By: Ali Behjati <ali@dourolabs.xyz>
Co-Authored-By: Ali Behjati <ali@dourolabs.xyz>
3149076
to
5738b2d
Compare
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 viaawait this.client.getGasPrice()
.Changes
gas-price
command line option to the EVM price pusher commandEvmPricePusher
constructor to accept the new parameterLink to Devin run
https://app.devin.ai/sessions/f9167dfbae7840baae3732610d30d08f
Requested by
user