diff --git a/apps/price_pusher/README.md b/apps/price_pusher/README.md index f9eaa41d8c..76256c41ce 100644 --- a/apps/price_pusher/README.md +++ b/apps/price_pusher/README.md @@ -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 \ diff --git a/apps/price_pusher/package.json b/apps/price_pusher/package.json index 277f901caa..ebae2094c0 100644 --- a/apps/price_pusher/package.json +++ b/apps/price_pusher/package.json @@ -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", diff --git a/apps/price_pusher/src/evm/command.ts b/apps/price_pusher/src/evm/command.ts index 37bd5daede..40f0967c41 100644 --- a/apps/price_pusher/src/evm/command.ts +++ b/apps/price_pusher/src/evm/command.ts @@ -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 " + @@ -94,6 +99,7 @@ export default { overrideGasPriceMultiplier, overrideGasPriceMultiplierCap, gasLimit, + gasPrice, updateFeeMultiplier, logLevel, controllerLogLevel, @@ -167,7 +173,8 @@ export default { overrideGasPriceMultiplierCap, updateFeeMultiplier, gasLimit, - gasStation + gasStation, + gasPrice ); const controller = new Controller( diff --git a/apps/price_pusher/src/evm/evm.ts b/apps/price_pusher/src/evm/evm.ts index 7101a1792c..8f8b22e2fd 100644 --- a/apps/price_pusher/src/evm/evm.ts +++ b/apps/price_pusher/src/evm/evm.ts @@ -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. @@ -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) {