Skip to content

Commit ff0d9fe

Browse files
authored
chore(eth): update mentions to evm-testnet and hermes-beta (#1151)
We have deployed new Pyth contracts on testnets using the stable feeds and users no longer need to use hermes-beta in many networks. This change updates the mentions to them.
1 parent 2b118c1 commit ff0d9fe

17 files changed

+171
-259
lines changed

contract_manager/scripts/update_pricefeed.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const parser = yargs(hideBin(process.argv))
2525
},
2626
endpoint: {
2727
type: "string",
28-
desc: "Hermes endpoint to use, defaults to https://hermes.pyth.network for mainnet and https://hermes-beta.pyth.network for testnet",
28+
desc: "Hermes endpoint to use, defaults to https://hermes.pyth.network",
2929
},
3030
});
3131

@@ -39,11 +39,8 @@ async function main() {
3939
)}`
4040
);
4141
}
42-
const defaultEndpoint = contract.getChain().isMainnet()
43-
? "https://hermes.pyth.network"
44-
: "https://hermes-beta.pyth.network";
4542
const priceService = new PriceServiceConnection(
46-
argv.endpoint || defaultEndpoint
43+
argv.endpoint || "https://hermes.pyth.network"
4744
);
4845
const vaas = await priceService.getLatestVaas(argv["feed-id"] as string[]);
4946
const privateKey = toPrivateKey(argv["private-key"]);

price_pusher/README.md

Lines changed: 28 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ Two sample YAML configuration files are available in the root of this repo.
7373
You can get the list of available price feeds from
7474
[here](https://pyth.network/developers/price-feed-ids/).
7575

76+
Price pusher communicates with [Hermes][] price service to get the most recent price updates. Hermes listens to the
77+
Pythnet and Wormhole network to get latest price updates, and serves REST and websocket APIs for consumers to fetch the
78+
updates. Pyth hosts public endpoints for Hermes; however, it is recommended to get a private endpoint from one of the
79+
Hermes RPC providers for more reliability. Please refer to [this
80+
document](https://docs.pyth.network/documentation/pythnet-price-feeds/hermes) for more information.
81+
7682
To run the price pusher, please run the following commands, replacing the command line arguments as necessary:
7783

7884
```sh
@@ -86,7 +92,7 @@ cd price_pusher
8692
# For EVM
8793
npm run start -- evm --endpoint wss://example-rpc.com \
8894
--pyth-contract-address 0xff1a0f4744e8582DF...... \
89-
--price-service-endpoint https://example-pyth-price.com \
95+
--price-service-endpoint https://example-hermes-rpc.com \
9096
--price-config-file "path/to/price-config.testnet.sample.yaml" \
9197
--mnemonic-file "path/to/mnemonic.txt" \
9298
[--pushing-frequency 10] \
@@ -95,7 +101,7 @@ npm run start -- evm --endpoint wss://example-rpc.com \
95101
96102
# For Injective
97103
npm run start -- injective --grpc-endpoint https://grpc-endpoint.com \
98-
--pyth-contract-address inj1z60tg0... --price-service-endpoint "https://example-pyth-price.com" \
104+
--pyth-contract-address inj1z60tg0... --price-service-endpoint "https://example-hermes-rpc.com" \
99105
--price-config-file "path/to/price-config.testnet.sample.yaml" \
100106
--mnemonic-file "path/to/mnemonic.txt" \
101107
--network testnet \
@@ -104,7 +110,8 @@ npm run start -- injective --grpc-endpoint https://grpc-endpoint.com \
104110
105111
# For Aptos
106112
npm run start -- aptos --endpoint https://fullnode.testnet.aptoslabs.com/v1 \
107-
--pyth-contract-address 0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387 --price-service-endpoint "https://hermes-beta.pyth.network" \
113+
--pyth-contract-address 0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387 \
114+
--price-service-endpoint "https://example-hermes-rpc.com" \
108115
--price-config-file "./price-config.testnet.sample.yaml" \
109116
--mnemonic-file "path/to/mnemonic.txt" \
110117
[--pushing-frequency 10] \
@@ -118,7 +125,7 @@ npm run start -- sui \
118125
--wormhole-package-id 0xcc029e2810f17f9f43f52262f40026a71fbdca40ed3803ad2884994361910b7e \
119126
--wormhole-state-id 0xebba4cc4d614f7a7cdbe883acc76d1cc767922bc96778e7b68be0d15fce27c02 \
120127
--price-feed-to-price-info-object-table-id 0xf8929174008c662266a1adde78e1e8e33016eb7ad37d379481e860b911e40ed5 \
121-
--price-service-endpoint https://hermes-beta.pyth.network \
128+
--price-service-endpoint https://example-hermes-rpc.com \
122129
--mnemonic-file ./mnemonic \
123130
--price-config-file ./price-config.testnet.sample.yaml \
124131
[--pushing-frequency 10] \
@@ -130,6 +137,8 @@ npm run start -- sui \
130137
docker run public.ecr.aws/pyth-network/xc-price-pusher:v<version> -- <above-arguments>
131138
```
132139

140+
[hermes]: https://github.com/pyth-network/pyth-crosschain/tree/main/hermes
141+
133142
### Command Line Arguments
134143

135144
To know more about the arguments the price-pusher accepts. You can run:
@@ -146,14 +155,17 @@ npm run start -- {network} --help
146155
For example, to push `BTC/USD` and `BNB/USD` prices on Fantom testnet, run the following command:
147156

148157
```sh
149-
npm run dev -- evm --endpoint https://endpoints.omniatech.io/v1/fantom/testnet/public \
150-
--pyth-contract-address 0xff1a0f4744e8582DF1aE09D5611b887B6a12925C --price-service-endpoint https://hermes-beta.pyth.network \
151-
--mnemonic-file "./mnemonic" --price-config-file "./price-config.testnet.sample.yaml"
158+
npm run dev -- evm \
159+
--endpoint https://endpoints.omniatech.io/v1/fantom/testnet/public \
160+
--pyth-contract-address 0x5744Cbf430D99456a0A8771208b674F27f8EF0Fb \
161+
--price-service-endpoint https://hermes.pyth.network \
162+
--mnemonic-file "./mnemonic" \
163+
--price-config-file "./price-config.stable.sample.yaml"
152164
```
153165

154-
[`price-config.testnet.sample.yaml`](./price-config.testnet.sample.yaml) contains configuration for `BTC/USD`
155-
and `BNB/USD` price feeds on Pyth testnet. [`price-config.mainnet.sample.yaml`](./price-config.mainnet.sample.yaml)
156-
contains the same configuration for `BTC/USD` and `BNB/USD` on Pyth mainnet.
166+
[`price-config.stable.sample.yaml`](./price-config.stable.sample.yaml) contains configuration for `BTC/USD`
167+
and `BNB/USD` price feeds on Pyth stable data sources. [`price-config.beta.sample.yaml`](./price-config.beta.sample.yaml)
168+
contains the same configuration for `BTC/USD` and `BNB/USD` on Pyth beta data sources.
157169

158170
You can also provide a config file instead of providing command line options, run the following command:
159171

@@ -163,30 +175,22 @@ npm run start -- injective --config "./config.injective.sample.json"
163175

164176
[`config.injective.sample.json`](./config.injective.sample.json) contains configuration to publish on Injective testnet.
165177

166-
## Running using a standalone price service (via docker-compose)
178+
## Running via docker-compose
167179

168-
Price pusher communicates with [Pyth price service][] to get the most recent price updates. Pyth price service listens to the
169-
Wormhole network to get latest price updates, and serves REST and websocket APIs for consumers to fetch the updates.
170-
Pyth hosts public endpoints for the price service; however, it is recommended to run it standalone to achieve more resiliency and
171-
scalability.
180+
This directory contains sample docker compose files ([stable](./docker-compose.stable.sample.yaml),
181+
[beta](./docker-compose.beta.sample.yaml)) a price pusher.
172182

173-
This directory contains sample docker compose files ([testnet](./docker-compose.testnet.sample.yaml),
174-
[mainnet](./docker-compose.mainnet.sample.yaml)) a price pusher and its dependencies, including a
175-
price service and a Wormhole spy. A price service depends on a Wormhole spy. A spy listens to the Wormhole
176-
network and reports all Pyth-related Wormhole messages to the price service.
177-
178-
To run the services via docker-compose, please modify the your target network (testnet, mainnet) sample docker-compose file to adjust the configurations.
183+
To run the services via docker-compose, please set the RPC endpoint and contract address of your target network in the
184+
sample docker-compose file.
179185

180186
Then, start the docker-compose like this:
181187

182188
```
183-
docker-compose -f docker-compose.testnet.sample.yaml up
189+
docker-compose -f docker-compose.stable.sample.yaml up
184190
```
185191

186192
It will take a few minutes until all the services are up and running.
187193

188-
[pyth price service]: https://github.com/pyth-network/pyth-crosschain/tree/main/price_service/server
189-
190194
## Reliability
191195

192196
You can run multiple instances of the price pusher to increase the reliability. It is better to use

price_pusher/config.aptos.testnet.sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
"pyth-contract-address": "0x7e783b349d3e89cf5931af376ebeadbfab855b3fa239b7ada8f5a92fbea6b387",
44
"price-service-endpoint": "https://hermes-beta.pyth.network",
55
"mnemonic-file": "./mnemonic",
6-
"price-config-file": "./price-config.testnet.sample.yaml"
6+
"price-config-file": "./price-config.beta.sample.yaml"
77
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"endpoint": "https://eth-mainnet.public.blastapi.io",
3+
"pyth-contract-address": "0x4305FB66699C3B2702D4d05CF36551390A4c69C6",
4+
"price-service-endpoint": "https://hermes.pyth.network",
5+
"mnemonic-file": "./mnemonic",
6+
"price-config-file": "./price-config.stable.sample.yaml"
7+
}

price_pusher/config.evm.testnet.sample.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

price_pusher/config.injective.testnet.sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33
"pyth-contract-address": "inj1z60tg0tekdzcasenhuuwq3htjcd5slmgf7gpez",
44
"price-service-endpoint": "https://hermes-beta.pyth.network",
55
"mnemonic-file": "./mnemonic",
6-
"price-config-file": "./price-config.testnet.sample.yaml",
6+
"price-config-file": "./price-config.beta.sample.yaml",
77
"network": "testnet"
88
}

price_pusher/config.sui.mainnet.sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"price-feed-to-price-info-object-table-id": "0x14b4697477d24c30c8eecc31dd1bd49a3115a9fe0db6bd4fd570cf14640b79a0",
88
"price-service-endpoint": "https://hermes.pyth.network",
99
"mnemonic-file": "./mnemonic",
10-
"price-config-file": "./price-config.mainnet.sample.yaml"
10+
"price-config-file": "./price-config.stable.sample.yaml"
1111
}

price_pusher/config.sui.testnet.sample.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@
77
"price-feed-to-price-info-object-table-id": "0xf8929174008c662266a1adde78e1e8e33016eb7ad37d379481e860b911e40ed5",
88
"price-service-endpoint": "https://hermes-beta.pyth.network",
99
"mnemonic-file": "./mnemonic",
10-
"price-config-file": "./price-config.testnet.sample.yaml"
10+
"price-config-file": "./price-config.beta.sample.yaml"
1111
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
services:
2+
price-pusher:
3+
# Use this to build the price pusher from source. A dependency of the pusher docker
4+
# image is the pyth-crosschain monorepo lerna docker image. Build lerna image
5+
# using the following command from the repo root:
6+
# `docker buildx build -f Dockerfile.lerna -t lerna .`
7+
#
8+
# Please note that the docker build from source only works in x86_64 platforms
9+
# and doesn't work on arm platforms (like Apple M1/M2).
10+
#
11+
# build:
12+
# context: .
13+
14+
# Replace <version> with the latest released image of the price pusher from here:
15+
# https://gallery.ecr.aws/pyth-network/xc-price-pusher
16+
image: public.ecr.aws/pyth-network/xc-price-pusher:v<version>
17+
restart: always
18+
command:
19+
- "--"
20+
- "evm"
21+
- "--endpoint"
22+
# Replace this with RPC endpoint URL for the EVM network.
23+
- "https://endpoints.omniatech.io/v1/fantom/testnet/public"
24+
- "--mnemonic-file"
25+
- "/mnemonic"
26+
- "--pyth-contract-address"
27+
# Replace this with the address of the Pyth contract on the EVM network.
28+
- "0xff1a0f4744e8582DF1aE09D5611b887B6a12925C"
29+
- "--price-service-endpoint"
30+
- "https://hermes-beta.pyth.network" # Replace this with a private Hermes RPC for more reliability
31+
- "--price-config-file"
32+
- "/price_config"
33+
configs:
34+
- mnemonic
35+
- price_config
36+
configs:
37+
mnemonic:
38+
file: ./mnemonic # Replace this with the path to the mnemonic file
39+
price_config:
40+
file: ./price-config.beta.sample.yaml # Replace this with the path to the price configuration file

price_pusher/docker-compose.mainnet.sample.yaml

Lines changed: 0 additions & 92 deletions
This file was deleted.

0 commit comments

Comments
 (0)