Skip to content

Commit

Permalink
Expose gas-price option for injective price pusher (#1185)
Browse files Browse the repository at this point in the history
  • Loading branch information
m30m committed Dec 14, 2023
1 parent 5d951ee commit 1be8a02
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 7 deletions.
6 changes: 4 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions price_pusher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ cd price_pusher
npm run start -- evm --endpoint wss://example-rpc.com \
--pyth-contract-address 0xff1a0f4744e8582DF...... \
--price-service-endpoint https://example-hermes-rpc.com \
--price-config-file "path/to/price-config.testnet.sample.yaml" \
--price-config-file "path/to/price-config.beta.sample.yaml" \
--mnemonic-file "path/to/mnemonic.txt" \
[--pushing-frequency 10] \
[--polling-frequency 5] \
Expand All @@ -102,17 +102,18 @@ npm run start -- evm --endpoint wss://example-rpc.com \
# For Injective
npm run start -- injective --grpc-endpoint https://grpc-endpoint.com \
--pyth-contract-address inj1z60tg0... --price-service-endpoint "https://example-hermes-rpc.com" \
--price-config-file "path/to/price-config.testnet.sample.yaml" \
--price-config-file "path/to/price-config.beta.sample.yaml" \
--mnemonic-file "path/to/mnemonic.txt" \
--network testnet \
[--gas-price 500000000] \
[--pushing-frequency 10] \
[--polling-frequency 5]
# For Aptos
npm run start -- aptos --endpoint https://fullnode.testnet.aptoslabs.com/v1 \
--pyth-contract-address 0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387 \
--price-service-endpoint "https://example-hermes-rpc.com" \
--price-config-file "./price-config.testnet.sample.yaml" \
--price-config-file "path/to/price-config.beta.sample.yaml" \
--mnemonic-file "path/to/mnemonic.txt" \
[--pushing-frequency 10] \
[--polling-frequency 5]
Expand All @@ -127,7 +128,7 @@ npm run start -- sui \
--price-feed-to-price-info-object-table-id 0xf8929174008c662266a1adde78e1e8e33016eb7ad37d379481e860b911e40ed5 \
--price-service-endpoint https://example-hermes-rpc.com \
--mnemonic-file ./mnemonic \
--price-config-file ./price-config.testnet.sample.yaml \
--price-config-file ./price-config.beta.sample.yaml \
[--pushing-frequency 10] \
[--polling-frequency 5] \
[--num-gas-objects 30]
Expand Down
2 changes: 1 addition & 1 deletion price_pusher/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pythnetwork/price-pusher",
"version": "6.0.0",
"version": "6.1.0",
"description": "Pyth Price Pusher",
"homepage": "https://pyth.network",
"main": "lib/index.js",
Expand Down
6 changes: 6 additions & 0 deletions price_pusher/src/injective/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export default {
type: "string",
required: true,
} as Options,
"gas-price": {
description: "Gas price to be used for each transasction",
type: "number",
} as Options,
...options.priceConfigFile,
...options.priceServiceEndpoint,
...options.mnemonicFile,
Expand All @@ -35,6 +39,7 @@ export default {
handler: function (argv: any) {
// FIXME: type checks for this
const {
gasPrice,
grpcEndpoint,
priceConfigFile,
priceServiceEndpoint,
Expand Down Expand Up @@ -87,6 +92,7 @@ export default {
mnemonic,
{
chainId: getNetworkInfo(network).chainId,
gasPrice,
}
);

Expand Down

0 comments on commit 1be8a02

Please sign in to comment.