Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/price_pusher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ pnpm run start evm --endpoint wss://example-rpc.com \
--mnemonic-file "path/to/mnemonic.txt" \
[--pushing-frequency 10] \
[--polling-frequency 5] \
[--override-gas-price-multiplier 1.1]
[--override-gas-price-multiplier 1.1] \
[--override-gas-price-multiplier-cap 5] \
[--gas-limit 1000000] \
[--gas-price 160000000]

# For Injective
pnpm run start injective --grpc-endpoint https://grpc-endpoint.com \
Expand Down
2 changes: 1 addition & 1 deletion apps/price_pusher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/price-pusher",
"version": "9.0.1",
"version": "9.1.0",
"description": "Pyth Price Pusher",
"homepage": "https://pyth.network",
"main": "lib/index.js",
Expand Down
9 changes: 8 additions & 1 deletion apps/price_pusher/src/evm/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ export default {
type: "number",
required: false,
} as Options,
"gas-price": {
description: "Override the gas price that would be received from the RPC",
type: "number",
required: false,
} as Options,
"update-fee-multiplier": {
description:
"Multiplier for the fee to update the price. It is useful in networks " +
Expand Down Expand Up @@ -94,6 +99,7 @@ export default {
overrideGasPriceMultiplier,
overrideGasPriceMultiplierCap,
gasLimit,
gasPrice,
updateFeeMultiplier,
logLevel,
controllerLogLevel,
Expand Down Expand Up @@ -167,7 +173,8 @@ export default {
overrideGasPriceMultiplierCap,
updateFeeMultiplier,
gasLimit,
gasStation
gasStation,
gasPrice
);

const controller = new Controller(
Expand Down
10 changes: 7 additions & 3 deletions apps/price_pusher/src/evm/evm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ export class EvmPricePusher implements IPricePusher {
private overrideGasPriceMultiplierCap: number,
private updateFeeMultiplier: number,
private gasLimit?: number,
private customGasStation?: CustomGasStation
private customGasStation?: CustomGasStation,
private gasPrice?: number
) {}

// The pubTimes are passed here to use the values that triggered the push.
Expand Down Expand Up @@ -187,8 +188,11 @@ export class EvmPricePusher implements IPricePusher {
// are using this to remain compatible with the networks that doesn't
// support this transaction type.
let gasPrice =
Number(await this.customGasStation?.getCustomGasPrice()) ||
Number(await this.client.getGasPrice());
this.gasPrice ??
Number(
await (this.customGasStation?.getCustomGasPrice() ??
this.client.getGasPrice())
);

// Try to re-use the same nonce and increase the gas if the last tx is not landed yet.
if (this.pusherAddress === undefined) {
Expand Down
Loading