Skip to content

Commit b4cf527

Browse files
authored
[price-service] Add price service client and sdk to this repo (#525)
* Move price service to server directory * Update references to price service * Add pyth-common-js as the service client * Update package names * Add pyth-sdk-js * Rename the sdk * Change readme a bit
1 parent 16b7977 commit b4cf527

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+22590
-41
lines changed

.github/workflows/price-service-image-push.yml renamed to .github/workflows/price-server-image-push.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build and Push Price Service Image
22
on:
33
push:
44
tags:
5-
- pyth-price-service-v*
5+
- pyth-price-server-v*
66
workflow_dispatch:
77
inputs:
88
dispatch_description:
@@ -13,18 +13,18 @@ permissions:
1313
contents: read
1414
id-token: write
1515
jobs:
16-
price-service-image:
16+
price-server-image:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v2
2020
- name: Set image tag to version of the git tag
21-
if: ${{ startsWith(github.ref, 'refs/tags/pyth-price-service-v') }}
21+
if: ${{ startsWith(github.ref, 'refs/tags/pyth-price-server-v') }}
2222
run: |
23-
PREFIX="refs/tags/pyth-price-service-"
23+
PREFIX="refs/tags/pyth-price-server-"
2424
VERSION="${GITHUB_REF:${#PREFIX}}"
2525
echo "IMAGE_TAG=${VERSION}" >> "${GITHUB_ENV}"
2626
- name: Set image tag to the git commit hash
27-
if: ${{ !startsWith(github.ref, 'refs/tags/pyth-price-service-v') }}
27+
if: ${{ !startsWith(github.ref, 'refs/tags/pyth-price-server-v') }}
2828
run: |
2929
echo "IMAGE_TAG=${{ github.sha }}" >> "${GITHUB_ENV}"
3030
- uses: aws-actions/configure-aws-credentials@8a84b07f2009032ade05a88a28750d733cc30db1
@@ -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 price_service/Dockerfile.price_service .
41+
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f price_service/server/Dockerfile .
4242
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
4343
env:
4444
ECR_REGISTRY: public.ecr.aws

Tiltfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ docker_build(
206206
k8s_yaml_with_ns("tilt_devnet/k8s/check-attestations.yaml")
207207
k8s_resource(
208208
"check-attestations",
209-
resource_deps = ["pyth-price-service", "pyth", "p2w-attest"],
209+
resource_deps = ["pyth-price-server", "pyth", "p2w-attest"],
210210
labels = ["pyth"],
211211
trigger_mode = trigger_mode,
212212
)
@@ -237,15 +237,15 @@ k8s_resource(
237237
labels = ["pyth"]
238238
)
239239

240-
# Pyth Price service
240+
# Pyth Price server
241241
docker_build(
242-
ref = "pyth-price-service",
242+
ref = "pyth-price-server",
243243
context = ".",
244-
dockerfile = "price_service/Dockerfile.price_service",
244+
dockerfile = "price_service/server/Dockerfile",
245245
)
246-
k8s_yaml_with_ns("tilt_devnet/k8s/pyth-price-service.yaml")
246+
k8s_yaml_with_ns("tilt_devnet/k8s/pyth-price-server.yaml")
247247
k8s_resource(
248-
"pyth-price-service",
248+
"pyth-price-server",
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),

price_service/client/js/.eslintrc.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module.exports = {
2+
root: true,
3+
parser: "@typescript-eslint/parser",
4+
plugins: ["@typescript-eslint"],
5+
extends: ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
6+
rules: {
7+
"@typescript-eslint/no-explicit-any": "off",
8+
"@typescript-eslint/no-non-null-assertion": "off",
9+
"@typescript-eslint/no-empty-function": "off",
10+
},
11+
};

price_service/client/js/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
lib/
File renamed without changes.

0 commit comments

Comments
 (0)