@@ -83,14 +83,14 @@ To run the price pusher, please run the following commands, replacing the comman
8383
8484` ` ` sh
8585# Please run the two following commands once from the root of the repo to build the code.
86- npm install
86+ pnpm install
8787pnpm exec lerna run build --scope @pythnetwork/price-pusher --include-dependencies
8888
8989# Navigate to the price_pusher folder
9090cd apps/price_pusher
9191
9292# For EVM
93- npm run start -- evm --endpoint wss://example-rpc.com \
93+ pnpm run start evm --endpoint wss://example-rpc.com \
9494 --pyth-contract-address 0xff1a0f4744e8582DF...... \
9595 --price-service-endpoint https://example-hermes-rpc.com \
9696 --price-config-file "path/to/price-config.beta.sample.yaml" \
@@ -100,7 +100,7 @@ npm run start -- evm --endpoint wss://example-rpc.com \
100100 [--override-gas-price-multiplier 1.1]
101101
102102# For Injective
103- npm run start -- injective --grpc-endpoint https://grpc-endpoint.com \
103+ pnpm run start injective --grpc-endpoint https://grpc-endpoint.com \
104104 --pyth-contract-address inj1z60tg0... --price-service-endpoint "https://example-hermes-rpc.com" \
105105 --price-config-file "path/to/price-config.beta.sample.yaml" \
106106 --mnemonic-file "path/to/mnemonic.txt" \
@@ -110,7 +110,7 @@ npm run start -- injective --grpc-endpoint https://grpc-endpoint.com \
110110 [--polling-frequency 5]
111111
112112# For Aptos
113- npm run start -- aptos --endpoint https://fullnode.testnet.aptoslabs.com/v1 \
113+ pnpm run start aptos --endpoint https://fullnode.testnet.aptoslabs.com/v1 \
114114 --pyth-contract-address 0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387 \
115115 --price-service-endpoint "https://example-hermes-rpc.com" \
116116 --price-config-file "path/to/price-config.beta.sample.yaml" \
@@ -119,7 +119,7 @@ npm run start -- aptos --endpoint https://fullnode.testnet.aptoslabs.com/v1 \
119119 [--polling-frequency 5]
120120
121121# For Sui
122- npm run start -- sui \
122+ pnpm run start sui \
123123 --endpoint https://sui-testnet-rpc.allthatnode.com \
124124 --pyth-package-id 0x975e063f398f720af4f33ec06a927f14ea76ca24f7f8dd544aa62ab9d5d15f44 \
125125 --pyth-state-id 0xd8afde3a48b4ff7212bd6829a150f43f59043221200d63504d981f62bff2e27a \
@@ -134,7 +134,7 @@ npm run start -- sui \
134134 [--num-gas-objects 30]
135135
136136# For Near
137- npm run start -- near \
137+ pnpm run start near \
138138 --node-url https://rpc.testnet.near.org \
139139 --network testnet \
140140 --account-id payer.testnet \
@@ -146,7 +146,7 @@ npm run start -- near \
146146 [--polling-frequency 5]
147147
148148# For Solana, using Jito (recommended)
149- npm run start -- solana \
149+ pnpm run start solana \
150150 --endpoint https://api.mainnet-beta.solana.com \
151151 --keypair-file ./id.json \
152152 --shard-id 1 \
@@ -161,7 +161,7 @@ npm run start -- solana \
161161 [--polling-frequency 5]
162162
163163# For Solana, using Solana RPC
164- npm run start -- solana \
164+ pnpm run start solana \
165165 --endpoint https://api.devnet.solana.com \
166166 --keypair-file ./id.json \
167167 --shard-id 1 \
@@ -184,23 +184,35 @@ docker run public.ecr.aws/pyth-network/xc-price-pusher:v<version> -- <above-argu
184184To know more about the arguments the price-pusher accepts. You can run :
185185
186186` ` ` sh
187- npm run start -- --help
187+ pnpm run start --help
188188
189189# for specific network run
190- npm run start -- {network} --help
190+ pnpm run start {network} --help
191191` ` `
192192
193+ # ## Logging
194+
195+ By default, the logging is set to `info`. You can change the logging level by passing the argument `--log-level` with the desired level.
196+ The available levels are `error`, `warn`, `info`, `debug`, and `trace`. Also, the logs have JSON format. If you wish to run the code with
197+ human-readable logs, you can pipe the output of the program to `pino-pretty`. See the example below for more information on how to do this.
198+
199+ You can configure the log level of some of the modules of the price pusher as well. The available modules are PriceServiceConnection, which
200+ is responsible for connecting to the Hermes price service, and Controller, which is responsible for checking the prices from the Hermes
201+ and the on-chain Pyth contract and deciding whether to push a new price. You can configure the log level of these modules by passing the
202+ ` --price-service-connection-log-level` and `--controller-log-level` arguments, respectively.
203+
193204# ## Example
194205
195206For example, to push `BTC/USD` and `BNB/USD` prices on Fantom testnet, run the following command :
196207
197208` ` ` sh
198- npm run dev -- evm \
209+ pnpm run dev evm \
199210 --endpoint https://endpoints.omniatech.io/v1/fantom/testnet/public \
200211 --pyth-contract-address 0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb \
201212 --price-service-endpoint https://hermes.pyth.network \
202213 --mnemonic-file "./mnemonic" \
203- --price-config-file "./price-config.stable.sample.yaml"
214+ --price-config-file "./price-config.stable.sample.yaml" \
215+ | pnpm exec pino-pretty # Make logs human-readable
204216` ` `
205217
206218[`price-config.stable.sample.yaml`](./price-config.stable.sample.yaml) contains configuration for `BTC/USD`
@@ -210,7 +222,7 @@ contains the same configuration for `BTC/USD` and `BNB/USD` on Pyth beta data so
210222You can also provide a config file instead of providing command line options, run the following command :
211223
212224` ` ` sh
213- npm run start -- injective --config "./config.injective.sample.json"
225+ pnpm run start injective --config "./config.injective.sample.json"
214226` ` `
215227
216228[`config.injective.sample.json`](./config.injective.sample.json) contains configuration to publish on Injective testnet.
0 commit comments