Skip to content

Commit 5b49468

Browse files
authored
chore: sample configs for Solana pusher (#1491)
* Continue * Sample configs
1 parent e46821d commit 5b49468

File tree

3 files changed

+47
-2
lines changed

3 files changed

+47
-2
lines changed

apps/price_pusher/README.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ By default, Pyth does not automatically update the on-chain price every time the
1010
instead, anyone can permissionlessly update the on-chain price prior to using it.
1111
For more information please refer to [this document](https://docs.pyth.network/documentation/how-pyth-works).
1212

13-
Protocols integrating with can update the on-chain Pyth prices in two different ways.
13+
Protocols integrating with Pyth can update the on-chain Pyth prices in two different ways.
1414
The first approach is on-demand updates: package a Pyth price update together with each transaction that depends on it.
1515
On-demand updates minimize latency and are more gas efficient, as prices are only updated on-chain when they are needed.
1616

@@ -145,6 +145,33 @@ npm run start -- near \
145145
[--pushing-frequency 10] \
146146
[--polling-frequency 5]
147147
148+
# For Solana, using Jito (recommended)
149+
npm run start -- solana \
150+
--endpoint https://api.mainnet-beta.solana.com \
151+
--keypair-file ./id.json \
152+
--shard-id 1 \
153+
--jito-endpoint mainnet.block-engine.jito.wtf \
154+
--jito-keypair-file ./jito.json \
155+
--jito-tip-lamports 100000 \
156+
--jito-bundle-size 5 \
157+
--price-config-file ./price-config.yaml \
158+
--price-service-endpoint https://hermes.pyth.network/ \
159+
--pyth-contract-address pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT \
160+
--pushing-frequency 30 \
161+
[--polling-frequency 5]
162+
163+
# For Solana, using Solana RPC
164+
npm run start -- solana \
165+
--endpoint https://api.devnet.solana.com \
166+
--keypair-file ./id.json \
167+
--shard-id 1 \
168+
--price-config-file ./price-config.yaml \
169+
--price-service-endpoint https://hermes.pyth.network/ \
170+
--pyth-contract-address pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT \
171+
--pushing-frequency 30 \
172+
[--polling-frequency 5]
173+
174+
148175
149176
# Or, run the price pusher docker image instead of building from the source
150177
docker run public.ecr.aws/pyth-network/xc-price-pusher:v<version> -- <above-arguments>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"endpoint": "https://api.mainnet-beta.solana.com",
3+
"keypair-file": "./id.json",
4+
"shard-id": 1,
5+
"jito-endpoint": "mainnet.block-engine.jito.wtf",
6+
"jito-keypair-file": "./jito.json",
7+
"jito-tip-lamports": "100000",
8+
"jito-bundle-size": "5",
9+
"price-config-file": "./price-config.yaml",
10+
"price-service-endpoint": "https://hermes.pyth.network/",
11+
"pyth-contract-address": "pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT",
12+
"pushing-frequency": "30"
13+
}
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
22
"endpoint": "https://api.devnet.solana.com",
3-
"keypair-file": "/keypair"
3+
"keypair-file": "./id.json",
4+
"shard-id": 1,
5+
"price-config-file": "./price-config.yaml",
6+
"price-service-endpoint": "https://hermes.pyth.network/",
7+
"pyth-contract-address": "pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT",
8+
"pushing-frequency": "30"
49
}

0 commit comments

Comments
 (0)