Skip to content
This repository was archived by the owner on Apr 3, 2023. It is now read-only.

Commit d76f403

Browse files
authored
Add mainnet + pythnet info to the docs (#40)
* Add and update sample files * Update the docs
1 parent 0882621 commit d76f403

File tree

6 files changed

+116
-13
lines changed

6 files changed

+116
-13
lines changed

pyth-evm-js/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ npm run example-relay -- --network bnb_testnet --mnemonic "my good mnemonic" --e
116116

117117
## How Pyth Works on EVM Chains
118118

119-
Pyth prices are published on Solana, and relayed to EVM chains using the [Wormhole Network](https://wormholenetwork.com/) as a cross-chain message passing bridge. The Wormhole Network observes when Pyth prices on Solana have changed and publishes an off-chain signed message attesting to this fact. This is explained in more detail [here](https://docs.wormholenetwork.com/wormhole/).
119+
Pyth prices are published on Pythnet, and relayed to EVM chains using the [Wormhole Network](https://wormholenetwork.com/) as a cross-chain message passing bridge. The Wormhole Network observes when Pyth prices on Pythnet have changed and publishes an off-chain signed message attesting to this fact. This is explained in more detail [here](https://docs.wormholenetwork.com/wormhole/).
120120

121121
This signed message can then be submitted to the Pyth contract on the EVM networks, which will verify the Wormhole message and update the Pyth contract with the new price.
122122

pyth-evm-price-pusher/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ The parameters above are configured per price feed in a price configuration YAML
4141
```
4242
4343
You can get the list of available price feeds from
44-
[here](https://pyth.network/developers/price-feed-ids/#pyth-cross-chain-testnet).
44+
[here](https://pyth.network/developers/price-feed-ids/).
4545
4646
To run the price pusher, please run the following commands, replacing the command line arguments as necessary:
4747
@@ -94,7 +94,8 @@ npm run start -- --evm-endpoint "https://data-seed-prebsc-1-s1.binance.org:8545"
9494
```
9595

9696
[`price-config.testnet.sample.yaml`](./price-config.testnet.sample.yaml) contains configuration for `BTC/USD`
97-
and `BNB/USD` price feeds on Pyth testnet.
97+
and `BNB/USD` price feeds on Pyth testnet. [`price-config.mainnet.sample.yaml`](./price-config.mainnet.sample.yaml)
98+
contains the same configuration for `BTC/USD` and `BNB/USD` on Pyth mainnet.
9899

99100
## Running using a standalone price service (via docker-compose)
100101

@@ -103,10 +104,10 @@ Wormhole network to get latest price updates, and serves REST and websocket APIs
103104
Pyth hosts public endpoints for the price service; however, it is recommended to run it standalone to achieve more resiliency and
104105
scalability.
105106

106-
This directory contains a sample testnet [docker compose file](./docker-compose.testnet.sample.yaml) that runs a EVM price pusher and all of its dependencies, including a price service and a Wormhole spy. A price service depends on a Wormhole spy. A spy listens to the
107+
This directory contains sample testnet docker compose files ([testnet](./docker-compose.testnet.sample.yaml)) that runs a EVM price pusher and all of its dependencies, including a price service and a Wormhole spy. A price service depends on a Wormhole spy. A spy listens to the
107108
Wormhole network and reports all Pyth-related Wormhole messages to the price service.
108109

109-
To run the services via docker-compose, please modify the sample docker-compose file to adjust
110+
To run the services via docker-compose, please modify the your target network (testnet, mainnet) sample docker-compose file to adjust
110111
the path to your mnemonic file, the path to your price configuration file, the EVM endpoint, and the Pyth contract address
111112
as necessary.
112113

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
services:
2+
spy:
3+
image: ghcr.io/wormhole-foundation/guardiand:v2.8.10.1
4+
command:
5+
- "spy"
6+
- "--nodeKey"
7+
- "/node.key"
8+
- "--spyRPC"
9+
- "[::]:7072"
10+
- "--bootstrap"
11+
- "/dns4/wormhole-mainnet-v2-bootstrap.certus.one/udp/8999/quic/p2p/12D3KooWQp644DK27fd3d4Km3jr7gHiuJJ5ZGmy8hH4py7fP4FP7"
12+
- "--network"
13+
- "/wormhole/mainnet/2"
14+
- "--logLevel"
15+
- "debug"
16+
price-service:
17+
image: public.ecr.aws/pyth-network/xc-server:v1.0.0
18+
environment:
19+
SPY_SERVICE_HOST: "spy:7072"
20+
SPY_SERVICE_FILTERS: |
21+
[
22+
{
23+
"chain_id": 1,
24+
"emitter_address": "6bb14509a612f01fbbc4cffeebd4bbfb492a86df717ebe92eb6df432a3f00a25"
25+
},
26+
{
27+
"chain_id": 26,
28+
"emitter_address": "f8cd23c2ab91237730770bbea08d61005cdda0984348f3f6eecb559638c0bba0"
29+
},
30+
]
31+
REST_PORT: "4200"
32+
PROM_PORT: "8081"
33+
READINESS_SPY_SYNC_TIME_SECONDS: "60"
34+
READINESS_NUM_LOADED_SYMBOLS: "8"
35+
LOG_LEVEL: debug
36+
healthcheck:
37+
test:
38+
[
39+
"CMD",
40+
"wget",
41+
"--no-verbose",
42+
"--tries=1",
43+
"--spider",
44+
"http://localhost:4200/ready",
45+
]
46+
start_period: 60s
47+
depends_on:
48+
- spy
49+
price-pusher:
50+
build:
51+
context: .
52+
# Uncomment this line (and comment out the above lines) to use a prebuilt image. Replace <version>
53+
# with the latest released image of the EVM price pusher from this repo release page:
54+
# https://github.com/pyth-network/pyth-js/releases
55+
# image: public.ecr.aws/pyth-network/xc-evm-price-pusher:v<version>
56+
restart: always
57+
command:
58+
- "--"
59+
- "--evm-endpoint"
60+
# Replace this with RPC endpoint URL for the EVM network.
61+
- "https://bsc-dataseed2.binance.org"
62+
- "--mnemonic-file"
63+
- "/mnemonic"
64+
- "--pyth-contract"
65+
# Replace this with the Pyth contract address. Provide the network name on which Pyth is deployed
66+
# or the Pyth contract address if you use a local network
67+
- "bnb"
68+
- "--price-endpoint"
69+
- "http://price-service:4200"
70+
- "--price-config-file"
71+
- "/price_config"
72+
configs:
73+
- mnemonic
74+
- price_config
75+
depends_on:
76+
price-service:
77+
condition: service_healthy
78+
configs:
79+
mnemonic:
80+
file: ./path/to/mnemonic.txt # Replace this with the path to the mnemonic file
81+
price_config:
82+
file: ./price-config.mainnet.sample.yaml # Replace this with the path to the price configuration file

pyth-evm-price-pusher/docker-compose.testnet.sample.yaml

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,23 @@ services:
1616
price-service:
1717
image: public.ecr.aws/pyth-network/xc-server:v1.0.0
1818
environment:
19-
- SPY_SERVICE_HOST=spy:7072
20-
- SPY_SERVICE_FILTERS=[{"chain_id":1,"emitter_address":"f346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0"}]
21-
- REST_PORT=4200
22-
- PROM_PORT=8081
23-
- READINESS_SPY_SYNC_TIME_SECONDS=60
24-
- READINESS_NUM_LOADED_SYMBOLS=8
25-
- LOG_LEVEL=debug
19+
SPY_SERVICE_HOST: "spy:7072"
20+
SPY_SERVICE_FILTERS: |
21+
[
22+
{
23+
"chain_id": 1,
24+
"emitter_address": "f346195ac02f37d60d4db8ffa6ef74cb1be3550047543a4a9ee9acf4d78697b0"
25+
},
26+
{
27+
"chain_id": 26,
28+
"emitter_address": "a27839d641b07743c0cb5f68c51f8cd31d2c0762bec00dc6fcd25433ef1ab5b6"
29+
},
30+
]
31+
REST_PORT: "4200"
32+
PROM_PORT: "8081"
33+
READINESS_SPY_SYNC_TIME_SECONDS: "60"
34+
READINESS_NUM_LOADED_SYMBOLS: "8"
35+
LOG_LEVEL: debug
2636
healthcheck:
2737
test:
2838
[
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
- alias: BTC/USD
2+
id: e62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43
3+
time_difference: 60
4+
price_deviation: 0.5
5+
confidence_ratio: 1
6+
- alias: BNB/USD
7+
id: 2f95862b045670cd22bee3114c39763a4a08beeb663b145d283c31d7d1101c4f
8+
time_difference: 60
9+
price_deviation: 1
10+
confidence_ratio: 1

pyth-terra-js/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ npm run example-relay -- --network testnet --mnemonic "my good mnemonic" --endpo
9595

9696
## How Pyth Works in Terra
9797

98-
Pyth prices are published on Solana, and relayed to Terra using the [Wormhole Network](https://wormholenetwork.com/) as a cross-chain message passing bridge. The Wormhole Network observes when Pyth prices on Solana have changed and publishes an off-chain signed message attesting to this fact. This is explained in more detail [here](https://docs.wormholenetwork.com/wormhole/).
98+
Pyth prices are published on Pythnet, and relayed to Terra using the [Wormhole Network](https://wormholenetwork.com/) as a cross-chain message passing bridge. The Wormhole Network observes when Pyth prices on Pythnet have changed and publishes an off-chain signed message attesting to this fact. This is explained in more detail [here](https://docs.wormholenetwork.com/wormhole/).
9999

100100
This signed message can then be submitted to the Pyth contract on the Terra network, which will verify the Wormhole message and update the Pyth Terra contract with the new price.
101101

0 commit comments

Comments
 (0)