Expose gas-price option for injective price pusher (#1185)

This commit is contained in:
Amin Moghaddam 2023-12-14 14:19:36 +01:00 committed by GitHub
parent 5d951ee755
commit 1be8a02b94
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 7 deletions

6
package-lock.json generated
View File

@ -45,6 +45,7 @@
"@pythnetwork/cosmwasm-deploy-tools": "*", "@pythnetwork/cosmwasm-deploy-tools": "*",
"@pythnetwork/price-service-client": "*", "@pythnetwork/price-service-client": "*",
"@pythnetwork/pyth-sui-js": "*", "@pythnetwork/pyth-sui-js": "*",
"aptos": "^1.5.0",
"bs58": "^5.0.0", "bs58": "^5.0.0",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^4.9.3" "typescript": "^4.9.3"
@ -54817,7 +54818,7 @@
}, },
"price_pusher": { "price_pusher": {
"name": "@pythnetwork/price-pusher", "name": "@pythnetwork/price-pusher",
"version": "5.7.1", "version": "6.1.0",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"@injectivelabs/sdk-ts": "1.10.72", "@injectivelabs/sdk-ts": "1.10.72",
@ -58001,7 +58002,7 @@
}, },
"target_chains/ethereum/entropy_sdk/solidity": { "target_chains/ethereum/entropy_sdk/solidity": {
"name": "@pythnetwork/entropy-sdk-solidity", "name": "@pythnetwork/entropy-sdk-solidity",
"version": "0.1.0", "version": "1.0.0",
"license": "Apache-2.0", "license": "Apache-2.0",
"devDependencies": { "devDependencies": {
"prettier": "^2.7.1", "prettier": "^2.7.1",
@ -79628,6 +79629,7 @@
"@pythnetwork/cosmwasm-deploy-tools": "*", "@pythnetwork/cosmwasm-deploy-tools": "*",
"@pythnetwork/price-service-client": "*", "@pythnetwork/price-service-client": "*",
"@pythnetwork/pyth-sui-js": "*", "@pythnetwork/pyth-sui-js": "*",
"aptos": "^1.5.0",
"bs58": "^5.0.0", "bs58": "^5.0.0",
"prettier": "^2.6.2", "prettier": "^2.6.2",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",

View File

@ -93,7 +93,7 @@ cd price_pusher
npm run start -- evm --endpoint wss://example-rpc.com \ npm run start -- evm --endpoint wss://example-rpc.com \
--pyth-contract-address 0xff1a0f4744e8582DF...... \ --pyth-contract-address 0xff1a0f4744e8582DF...... \
--price-service-endpoint https://example-hermes-rpc.com \ --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" \ --mnemonic-file "path/to/mnemonic.txt" \
[--pushing-frequency 10] \ [--pushing-frequency 10] \
[--polling-frequency 5] \ [--polling-frequency 5] \
@ -102,9 +102,10 @@ npm run start -- evm --endpoint wss://example-rpc.com \
# For Injective # For Injective
npm run start -- injective --grpc-endpoint https://grpc-endpoint.com \ npm run start -- injective --grpc-endpoint https://grpc-endpoint.com \
--pyth-contract-address inj1z60tg0... --price-service-endpoint "https://example-hermes-rpc.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" \ --mnemonic-file "path/to/mnemonic.txt" \
--network testnet \ --network testnet \
[--gas-price 500000000] \
[--pushing-frequency 10] \ [--pushing-frequency 10] \
[--polling-frequency 5] [--polling-frequency 5]
@ -112,7 +113,7 @@ npm run start -- injective --grpc-endpoint https://grpc-endpoint.com \
npm run start -- aptos --endpoint https://fullnode.testnet.aptoslabs.com/v1 \ npm run start -- aptos --endpoint https://fullnode.testnet.aptoslabs.com/v1 \
--pyth-contract-address 0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387 \ --pyth-contract-address 0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387 \
--price-service-endpoint "https://example-hermes-rpc.com" \ --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" \ --mnemonic-file "path/to/mnemonic.txt" \
[--pushing-frequency 10] \ [--pushing-frequency 10] \
[--polling-frequency 5] [--polling-frequency 5]
@ -127,7 +128,7 @@ npm run start -- sui \
--price-feed-to-price-info-object-table-id 0xf8929174008c662266a1adde78e1e8e33016eb7ad37d379481e860b911e40ed5 \ --price-feed-to-price-info-object-table-id 0xf8929174008c662266a1adde78e1e8e33016eb7ad37d379481e860b911e40ed5 \
--price-service-endpoint https://example-hermes-rpc.com \ --price-service-endpoint https://example-hermes-rpc.com \
--mnemonic-file ./mnemonic \ --mnemonic-file ./mnemonic \
--price-config-file ./price-config.testnet.sample.yaml \ --price-config-file ./price-config.beta.sample.yaml \
[--pushing-frequency 10] \ [--pushing-frequency 10] \
[--polling-frequency 5] \ [--polling-frequency 5] \
[--num-gas-objects 30] [--num-gas-objects 30]

View File

@ -1,6 +1,6 @@
{ {
"name": "@pythnetwork/price-pusher", "name": "@pythnetwork/price-pusher",
"version": "6.0.0", "version": "6.1.0",
"description": "Pyth Price Pusher", "description": "Pyth Price Pusher",
"homepage": "https://pyth.network", "homepage": "https://pyth.network",
"main": "lib/index.js", "main": "lib/index.js",

View File

@ -25,6 +25,10 @@ export default {
type: "string", type: "string",
required: true, required: true,
} as Options, } as Options,
"gas-price": {
description: "Gas price to be used for each transasction",
type: "number",
} as Options,
...options.priceConfigFile, ...options.priceConfigFile,
...options.priceServiceEndpoint, ...options.priceServiceEndpoint,
...options.mnemonicFile, ...options.mnemonicFile,
@ -35,6 +39,7 @@ export default {
handler: function (argv: any) { handler: function (argv: any) {
// FIXME: type checks for this // FIXME: type checks for this
const { const {
gasPrice,
grpcEndpoint, grpcEndpoint,
priceConfigFile, priceConfigFile,
priceServiceEndpoint, priceServiceEndpoint,
@ -87,6 +92,7 @@ export default {
mnemonic, mnemonic,
{ {
chainId: getNetworkInfo(network).chainId, chainId: getNetworkInfo(network).chainId,
gasPrice,
} }
); );