Skip to content

Commit 0e55d08

Browse files
authored
[price-service] Move to top (#474)
* Move price service to top * Update the paths and docs * A little cleanup
1 parent ad864c6 commit 0e55d08

24 files changed

+50
-24
lines changed

.github/workflows/price-service-image-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
AWS_REGION: us-east-1
3939
- run: |
4040
DOCKER_BUILDKIT=1 docker build -f tilt-devnet/docker-images/Dockerfile.wasm -o type=local,dest=. .
41-
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f third_party/pyth/price-service/Dockerfile.price_service .
41+
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f price-service/Dockerfile.price_service .
4242
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
4343
env:
4444
ECR_REGISTRY: public.ecr.aws

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Pyth2Wormhole
1+
# Pyth Crosschain
22

33
This repository acts as a monorepo for the various components that make up
4-
Pyth2Wormhole. The base repository is a fork from Certus One's reference
4+
Pyth Crosschain. The base repository is a fork from Certus One's reference
55
[Wormhole][] implementation in order to take advantage of the existing tooling
66
for building projects based on Wormhole's various SDKs. Much of the existing
77
documentation from there will also apply to this repository.
@@ -10,36 +10,38 @@ documentation from there will also apply to this repository.
1010

1111
Within this monorepo you will find the following subprojects:
1212

13-
## Pyth2Wormhole Solana
13+
## Wormhole Attester
1414

15-
> solana/pyth2wormhole
15+
> wormhole-attester
1616
1717
The main Pyth implementation currently exists as an [on-chain contract][] on
18-
Solana. In order to expose these prices cross-chain, the Pyth2Wormhole Solana
18+
Solana. In order to expose these prices cross-chain, the Wormhole Attester
1919
contract acts as a sender for Pyth prices. At regular intervals the Pyth
2020
contract will observe the current Pyth price for selected products, and produce
2121
an attestation which is then relayed over Wormhole to be consumed by the
22-
various P2W receiver contracts.
22+
various receiver contracts.
2323

2424
[on-chain contract]: https://github.com/pyth-network/pyth-client
2525

26-
## Pyth2Wormhole Ethereum
26+
## Target Chains
2727

28-
> ethereum/contracts/pyth
28+
### Ethereum
2929

30-
The Ethereum P2W contract acts as a receiver for Pyth prices relayed from the
31-
P2W Solana contract. It also provides a public API for other Ethereum contracts
30+
> target-chains/ethereum/contracts/pyth
31+
32+
The Ethereum contract acts as a receiver for Pyth prices relayed from the
33+
Wormhole Attester. It also provides a public API for other Ethereum contracts
3234
that can be used to consume Pyth prices. For a guide on using this API to
33-
consume Pyth price feeds see [pyth-evm-sdk][] which contains documented
35+
consume Pyth price feeds see [pyth-sdk-solidity][] which contains documented
3436
examples.
3537

36-
[pyth-evm-sdk]: https://github.com/pyth-network/pyth-sdk-solidity
38+
[pyth-sdk-solidity]: https://github.com/pyth-network/pyth-sdk-solidity
3739

38-
## Pyth2Wormhole Price Service
40+
## Price Service
3941

40-
> third_party/pyth
42+
> price-service
4143
42-
The P2W Price Service is an off-chain service which constantly observes the
44+
The Price Service is an off-chain service which constantly observes the
4345
Wormhole network watching for price attestations emitted from the Pyth Solana
4446
contract. It exposes all observed attestations via a public API over HTTPS/WSS
4547
which can be consumed by client-side applications that wish to use Pyth pricing

Tiltfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,15 +241,14 @@ k8s_resource(
241241
docker_build(
242242
ref = "pyth-price-service",
243243
context = ".",
244-
dockerfile = "third_party/pyth/price-service/Dockerfile.price_service",
244+
dockerfile = "price-service/Dockerfile.price_service",
245245
)
246246
k8s_yaml_with_ns("tilt-devnet/k8s/pyth-price-service.yaml")
247247
k8s_resource(
248248
"pyth-price-service",
249249
resource_deps = ["pyth", "p2w-attest", "spy", "eth-devnet", "wasm-gen"],
250250
port_forwards = [
251251
port_forward(4202, container_port = 4200, name = "Rest API (Status + Query) [:4202]", host = webHost),
252-
port_forward(6202, container_port = 6200, name = "WSS API [:6202]", host = webHost),
253252
port_forward(8083, container_port = 8081, name = "Prometheus [:8083]", host = webHost)],
254253
labels = ["pyth"]
255254
)
File renamed without changes.

third_party/pyth/price-service/Dockerfile.price_service renamed to price-service/Dockerfile.price_service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ WORKDIR ${BASE_PATH}/${P2W_SDK_REL_PATH}
1010
COPY --chown=pyth:pyth ${P2W_SDK_REL_PATH} .
1111
RUN npm ci && npm run build && npm cache clean --force
1212

13-
ARG PRICE_SERVICE_REL_PATH=third_party/pyth/price-service
13+
ARG PRICE_SERVICE_REL_PATH=price-service
1414
WORKDIR ${BASE_PATH}/${PRICE_SERVICE_REL_PATH}
1515
COPY --chown=pyth:pyth ${PRICE_SERVICE_REL_PATH} .
1616
RUN npm ci && npm run build && npm cache clean --force

third_party/pyth/price-service/README.md renamed to price-service/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ Then, build the image from [the repo root](../../../) like below. It will create
5757
local image named `pyth_price_service`.
5858

5959
```
60-
$ docker buildx build -f third_party/pyth/price-service/Dockerfile.price_service -t pyth_price_service .
60+
$ docker buildx build -f price-service/Dockerfile.price_service -t pyth_price_service .
6161
```
6262

6363
If you wish to build price service without docker, please follow the instruction of the price service

0 commit comments

Comments
 (0)