File tree Expand file tree Collapse file tree 6 files changed +18
-9
lines changed
target_chains/cosmwasm/tools/src Expand file tree Collapse file tree 6 files changed +18
-9
lines changed Original file line number Diff line number Diff line change @@ -105,7 +105,8 @@ pnpm run start injective --grpc-endpoint https://grpc-endpoint.com \
105105 --price-config-file "path/to/price-config.beta.sample.yaml" \
106106 --mnemonic-file "path/to/mnemonic.txt" \
107107 --network testnet \
108- [--gas-price 500000000] \
108+ [--gas-price 160000000] \
109+ [--gas-multiplier 1.1] \
109110 [--pushing-frequency 10] \
110111 [--polling-frequency 5]
111112
Original file line number Diff line number Diff line change 11{
22 "name" : " @pythnetwork/price-pusher" ,
3- "version" : " 8.0.4 " ,
3+ "version" : " 8.1.0 " ,
44 "description" : " Pyth Price Pusher" ,
55 "homepage" : " https://pyth.network" ,
66 "main" : " lib/index.js" ,
Original file line number Diff line number Diff line change @@ -30,6 +30,10 @@ export default {
3030 description : "Gas price to be used for each transasction" ,
3131 type : "number" ,
3232 } as Options ,
33+ "gas-multiplier" : {
34+ description : "Gas multiplier to be used for each transasction" ,
35+ type : "number" ,
36+ } as Options ,
3337 ...options . priceConfigFile ,
3438 ...options . priceServiceEndpoint ,
3539 ...options . mnemonicFile ,
@@ -44,6 +48,7 @@ export default {
4448 // FIXME: type checks for this
4549 const {
4650 gasPrice,
51+ gasMultiplier,
4752 grpcEndpoint,
4853 priceConfigFile,
4954 priceServiceEndpoint,
@@ -101,6 +106,7 @@ export default {
101106 {
102107 chainId : getNetworkInfo ( network ) . chainId ,
103108 gasPrice,
109+ gasMultiplier,
104110 }
105111 ) ;
106112
Original file line number Diff line number Diff line change @@ -22,7 +22,9 @@ import {
2222import { Logger } from "pino" ;
2323import { Account } from "@injectivelabs/sdk-ts/dist/cjs/client/chain/types/auth" ;
2424
25- const DEFAULT_GAS_PRICE = 500000000 ;
25+ const DEFAULT_GAS_PRICE = 160000000 ;
26+ const DEFAULT_GAS_MULTIPLIER = 1.05 ;
27+ const INJECTIVE_TESTNET_CHAIN_ID = "injective-888" ;
2628
2729type PriceQueryResponse = {
2830 price_feed : {
@@ -108,8 +110,8 @@ export class InjectivePricePusher implements IPricePusher {
108110 this . wallet = PrivateKey . fromMnemonic ( mnemonic ) ;
109111
110112 this . chainConfig = {
111- chainId : chainConfig ?. chainId ?? "injective-888" ,
112- gasMultiplier : chainConfig ?. gasMultiplier ?? 1.2 ,
113+ chainId : chainConfig ?. chainId ?? INJECTIVE_TESTNET_CHAIN_ID ,
114+ gasMultiplier : chainConfig ?. gasMultiplier ?? DEFAULT_GAS_MULTIPLIER ,
113115 gasPrice : chainConfig ?. gasPrice ?? DEFAULT_GAS_PRICE ,
114116 } ;
115117 }
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ import {
3434} from "@injectivelabs/networks" ;
3535import * as net from "net" ;
3636
37- const DEFAULT_GAS_PRICE = 500000000 ;
37+ const DEFAULT_GAS_PRICE = 160000000 ;
3838
3939export class InjectiveExecutor implements ChainExecutor {
4040 private readonly gasMultiplier = 2 ;
Original file line number Diff line number Diff line change @@ -87,12 +87,12 @@ export class InjectiveDeployer implements Deployer {
8787 const txResponse = await this . signAndBroadcastMsg ( store_code , {
8888 amount : [
8989 {
90- // gas = 5000000 & gasPrice = 500000000
91- amount : String ( 500000000 * 5000000 ) ,
90+ // gas = 5000000 & gasPrice = 160000000
91+ amount : String ( 160000000 * 5000000 ) ,
9292 denom : "inj" ,
9393 } ,
9494 ] ,
95- // DEFAULT STD FEE that we use has gas = 400000 and gasPrice = 500000000
95+ // DEFAULT STD FEE that we use has gas = 400000 and gasPrice = 160000000
9696 // But this transaction was taking gas around 3000000. Which is a lot more
9797 // Keeping the gasPrice same as in default std fee as seen above in amount.
9898 // Changing the gasLimit to 5000000
You can’t perform that action at this time.
0 commit comments