[refactor] Convert hyphen to underscore in the directory tree (#524)
* Move price-service to price_service * Update references to price-service * Rename target-chains to target_chains * Update references to target-chains * Rename tilt-devnet to tilt_devnet * Update references to tilt-devnet * Rename wormhole-attester to wormhole_attester * Update references to wormhole-attester * Rename multisig-wh-message-builder * Update references to wh-msg-bldr * Fix dockerfile issue * Rename remove-executor to remote_executor * Update references to remote-executor * Rename xc-governance-sdk-js * Update references to the governance sdk * Move docker-images to docker_images * Update references to docker-images
This commit is contained in:
parent
58f3ddcb13
commit
084acdb57e
|
@ -1,14 +1,14 @@
|
|||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- target-chains/ethereum/**
|
||||
- governance/xc-governance-sdk-js/**
|
||||
- target_chains/ethereum/**
|
||||
- governance/xc_governance_sdk_js/**
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- target-chains/ethereum/**
|
||||
- governance/xc-governance-sdk-js/**
|
||||
- target_chains/ethereum/**
|
||||
- governance/xc_governance_sdk_js/**
|
||||
|
||||
name: Ethereum Contract
|
||||
|
||||
|
@ -18,13 +18,13 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: target-chains/ethereum/
|
||||
working-directory: target_chains/ethereum/
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Install XC-governance sdk dependencies
|
||||
run: npm ci
|
||||
working-directory: governance/xc-governance-sdk-js
|
||||
working-directory: governance/xc_governance_sdk_js
|
||||
|
||||
- name: Install contract npm dependencies
|
||||
run: npm ci
|
||||
|
|
|
@ -37,8 +37,8 @@ jobs:
|
|||
env:
|
||||
AWS_REGION: us-east-1
|
||||
- run: |
|
||||
DOCKER_BUILDKIT=1 docker build -f tilt-devnet/docker-images/Dockerfile.wasm -o type=local,dest=. .
|
||||
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f price-service/Dockerfile.price_service .
|
||||
DOCKER_BUILDKIT=1 docker build -f tilt_devnet/docker_images/Dockerfile.wasm -o type=local,dest=. .
|
||||
DOCKER_BUILDKIT=1 docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f price_service/Dockerfile.price_service .
|
||||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||
env:
|
||||
ECR_REGISTRY: public.ecr.aws
|
||||
|
|
|
@ -3,13 +3,13 @@ name: Pyth CosmWasm Contract
|
|||
on:
|
||||
pull_request:
|
||||
paths:
|
||||
- target-chains/cosmwasm/**
|
||||
- target_chains/cosmwasm/**
|
||||
- third_party/pyth/p2w-sdk/rust/**
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- target-chains/cosmwasm/**
|
||||
- target_chains/cosmwasm/**
|
||||
- third_party/pyth/p2w-sdk/rust/**
|
||||
|
||||
env:
|
||||
|
@ -20,7 +20,7 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: target-chains/cosmwasm/contracts/pyth
|
||||
working-directory: target_chains/cosmwasm/contracts/pyth
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Build
|
||||
|
|
|
@ -2,10 +2,10 @@ name: Check Remote Executor
|
|||
|
||||
on:
|
||||
pull_request:
|
||||
paths: [governance/remote-executor/**]
|
||||
paths: [governance/remote_executor/**]
|
||||
push:
|
||||
branches: [main]
|
||||
paths: [governance/remote-executor/**]
|
||||
paths: [governance/remote_executor/**]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -22,4 +22,4 @@ jobs:
|
|||
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"
|
||||
echo "/home/runner/.local/share/solana/install/active_release/bin" >> $GITHUB_PATH
|
||||
- name: Run executor tests
|
||||
run: cargo test-bpf --manifest-path ./governance/remote-executor/Cargo.toml
|
||||
run: cargo test-bpf --manifest-path ./governance/remote_executor/Cargo.toml
|
||||
|
|
|
@ -21,43 +21,43 @@ repos:
|
|||
- id: cargo-fmt-remote-executor
|
||||
name: Cargo format for remote executor
|
||||
language: "rust"
|
||||
entry: cargo +nightly fmt --manifest-path ./governance/remote-executor/Cargo.toml --all -- --config-path rustfmt.toml
|
||||
entry: cargo +nightly fmt --manifest-path ./governance/remote_executor/Cargo.toml --all -- --config-path rustfmt.toml
|
||||
pass_filenames: false
|
||||
files: governance/remote-executor
|
||||
files: governance/remote_executor
|
||||
- id: cargo-clippy-remote-executor
|
||||
name: Cargo clippy for remote executor
|
||||
language: "rust"
|
||||
entry: cargo +nightly clippy --manifest-path ./governance/remote-executor/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
||||
entry: cargo +nightly clippy --manifest-path ./governance/remote_executor/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
||||
pass_filenames: false
|
||||
files: governance/remote-executor
|
||||
files: governance/remote_executor
|
||||
# Hooks for the attester
|
||||
- id: cargo-fmt-attester
|
||||
name: Cargo format for attester
|
||||
language: "rust"
|
||||
entry: cargo +nightly fmt --manifest-path ./wormhole-attester/Cargo.toml --all -- --config-path rustfmt.toml
|
||||
entry: cargo +nightly fmt --manifest-path ./wormhole_attester/Cargo.toml --all -- --config-path rustfmt.toml
|
||||
pass_filenames: false
|
||||
files: wormhole-attester
|
||||
files: wormhole_attester
|
||||
- id: cargo-clippy-attester
|
||||
name: Cargo clippy for attester
|
||||
language: "rust"
|
||||
entry: |
|
||||
bash -c 'EMITTER_ADDRESS=0 BRIDGE_ADDRESS=0 cargo +nightly clippy --manifest-path \
|
||||
./wormhole-attester/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings'
|
||||
./wormhole_attester/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings'
|
||||
pass_filenames: false
|
||||
files: wormhole-attester
|
||||
files: wormhole_attester
|
||||
# Hooks for cosmwasm contract
|
||||
- id: cargo-fmt-cosmwasm
|
||||
name: Cargo format for cosmwasm contract
|
||||
language: "rust"
|
||||
entry: cargo +nightly fmt --manifest-path ./target-chains/cosmwasm/Cargo.toml --all -- --config-path rustfmt.toml
|
||||
entry: cargo +nightly fmt --manifest-path ./target_chains/cosmwasm/Cargo.toml --all -- --config-path rustfmt.toml
|
||||
pass_filenames: false
|
||||
files: target-chains/cosmwasm
|
||||
files: target_chains/cosmwasm
|
||||
- id: cargo-clippy-cosmwasm
|
||||
name: Cargo clippy for cosmwasm contract
|
||||
language: "rust"
|
||||
entry: cargo +nightly clippy --manifest-path ./target-chains/cosmwasm/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
||||
entry: cargo +nightly clippy --manifest-path ./target_chains/cosmwasm/Cargo.toml --tests --fix --allow-dirty --allow-staged -- -D warnings
|
||||
pass_filenames: false
|
||||
files: target-chains/cosmwasm
|
||||
files: target_chains/cosmwasm
|
||||
# Hooks for p2w-sdk/rust
|
||||
- id: cargo-fmt-p2w-sdk
|
||||
name: Cargo format for p2w-sdk
|
||||
|
|
|
@ -12,7 +12,7 @@ Within this monorepo you will find the following subprojects:
|
|||
|
||||
## Wormhole Attester
|
||||
|
||||
> wormhole-attester
|
||||
> wormhole_attester
|
||||
|
||||
The main Pyth implementation currently exists as an [on-chain contract][] on
|
||||
Solana. In order to expose these prices cross-chain, the Wormhole Attester
|
||||
|
@ -27,7 +27,7 @@ various receiver contracts.
|
|||
|
||||
### Ethereum
|
||||
|
||||
> target-chains/ethereum/contracts/pyth
|
||||
> target_chains/ethereum/contracts/pyth
|
||||
|
||||
The Ethereum contract acts as a receiver for Pyth prices relayed from the
|
||||
Wormhole Attester. It also provides a public API for other Ethereum contracts
|
||||
|
@ -39,7 +39,7 @@ examples.
|
|||
|
||||
## Price Service
|
||||
|
||||
> price-service
|
||||
> price_service
|
||||
|
||||
The Price Service is an off-chain service which constantly observes the
|
||||
Wormhole network watching for price attestations emitted from the Pyth Solana
|
||||
|
|
48
Tiltfile
48
Tiltfile
|
@ -66,16 +66,16 @@ def k8s_yaml_with_ns(objects):
|
|||
|
||||
local_resource(
|
||||
name = "wasm-gen",
|
||||
cmd = "tilt docker build -- -f tilt-devnet/docker-images/Dockerfile.wasm -o type=local,dest=. .",
|
||||
cmd = "tilt docker build -- -f tilt_devnet/docker_images/Dockerfile.wasm -o type=local,dest=. .",
|
||||
env = {"DOCKER_BUILDKIT": "1"},
|
||||
deps = "./wormhole-attester",
|
||||
deps = "./wormhole_attester",
|
||||
labels = ["wasm"],
|
||||
allow_parallel=True,
|
||||
trigger_mode = trigger_mode,
|
||||
)
|
||||
|
||||
def build_node_yaml():
|
||||
node_yaml = read_yaml_stream("tilt-devnet/k8s/node.yaml")
|
||||
node_yaml = read_yaml_stream("tilt_devnet/k8s/node.yaml")
|
||||
|
||||
for obj in node_yaml:
|
||||
if obj["kind"] == "StatefulSet" and obj["metadata"]["name"] == "guardian":
|
||||
|
@ -103,7 +103,7 @@ k8s_resource(
|
|||
)
|
||||
|
||||
# spy
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/spy.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/spy.yaml")
|
||||
|
||||
k8s_resource(
|
||||
"spy",
|
||||
|
@ -121,7 +121,7 @@ k8s_resource(
|
|||
docker_build(
|
||||
ref = "bridge-client",
|
||||
context = ".",
|
||||
dockerfile = "tilt-devnet/docker-images/Dockerfile.client",
|
||||
dockerfile = "tilt_devnet/docker_images/Dockerfile.client",
|
||||
)
|
||||
|
||||
# solana smart contract
|
||||
|
@ -129,12 +129,12 @@ docker_build(
|
|||
docker_build(
|
||||
ref = "solana-contract",
|
||||
context = ".",
|
||||
dockerfile = "tilt-devnet/docker-images/Dockerfile.solana",
|
||||
dockerfile = "tilt_devnet/docker_images/Dockerfile.solana",
|
||||
)
|
||||
|
||||
# solana local devnet
|
||||
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/solana-devnet.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/solana-devnet.yaml")
|
||||
|
||||
k8s_resource(
|
||||
"solana-devnet",
|
||||
|
@ -152,7 +152,7 @@ k8s_resource(
|
|||
docker_build(
|
||||
ref = "eth-node",
|
||||
context = "./",
|
||||
dockerfile = "tilt-devnet/docker-images/Dockerfile.ethereum",
|
||||
dockerfile = "tilt_devnet/docker_images/Dockerfile.ethereum",
|
||||
|
||||
# sync external scripts for incremental development
|
||||
# (everything else needs to be restarted from scratch for determinism)
|
||||
|
@ -170,7 +170,7 @@ docker_build(
|
|||
context = ".",
|
||||
dockerfile = "third_party/pyth/Dockerfile.pyth",
|
||||
)
|
||||
k8s_yaml_with_ns("./tilt-devnet/k8s/pyth.yaml")
|
||||
k8s_yaml_with_ns("./tilt_devnet/k8s/pyth.yaml")
|
||||
|
||||
k8s_resource(
|
||||
"pyth",
|
||||
|
@ -186,7 +186,7 @@ docker_build(
|
|||
dockerfile = "./third_party/pyth/Dockerfile.p2w-attest",
|
||||
)
|
||||
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/p2w-attest.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/p2w-attest.yaml")
|
||||
k8s_resource(
|
||||
"p2w-attest",
|
||||
resource_deps = ["solana-devnet", "pyth", "guardian"],
|
||||
|
@ -203,7 +203,7 @@ docker_build(
|
|||
dockerfile = "./third_party/pyth/Dockerfile.check-attestations",
|
||||
)
|
||||
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/check-attestations.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/check-attestations.yaml")
|
||||
k8s_resource(
|
||||
"check-attestations",
|
||||
resource_deps = ["pyth-price-service", "pyth", "p2w-attest"],
|
||||
|
@ -217,7 +217,7 @@ docker_build(
|
|||
context = ".",
|
||||
dockerfile = "third_party/pyth/p2w-relay/Dockerfile.pyth_relay",
|
||||
)
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/p2w-terra-relay.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/p2w-terra-relay.yaml")
|
||||
k8s_resource(
|
||||
"p2w-terra-relay",
|
||||
resource_deps = ["pyth", "p2w-attest", "spy", "terra-terrad", "wasm-gen"],
|
||||
|
@ -227,7 +227,7 @@ k8s_resource(
|
|||
labels = ["pyth"]
|
||||
)
|
||||
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/p2w-evm-relay.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/p2w-evm-relay.yaml")
|
||||
k8s_resource(
|
||||
"p2w-evm-relay",
|
||||
resource_deps = ["pyth", "p2w-attest", "spy", "eth-devnet", "wasm-gen"],
|
||||
|
@ -241,9 +241,9 @@ k8s_resource(
|
|||
docker_build(
|
||||
ref = "pyth-price-service",
|
||||
context = ".",
|
||||
dockerfile = "price-service/Dockerfile.price_service",
|
||||
dockerfile = "price_service/Dockerfile.price_service",
|
||||
)
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/pyth-price-service.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/pyth-price-service.yaml")
|
||||
k8s_resource(
|
||||
"pyth-price-service",
|
||||
resource_deps = ["pyth", "p2w-attest", "spy", "eth-devnet", "wasm-gen"],
|
||||
|
@ -253,7 +253,7 @@ k8s_resource(
|
|||
labels = ["pyth"]
|
||||
)
|
||||
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/eth-devnet.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/eth-devnet.yaml")
|
||||
|
||||
k8s_resource(
|
||||
"eth-devnet",
|
||||
|
@ -278,17 +278,17 @@ k8s_resource(
|
|||
|
||||
docker_build(
|
||||
ref = "terra-image",
|
||||
context = "./target-chains/cosmwasm/devnet",
|
||||
dockerfile = "./target-chains/cosmwasm/devnet/Dockerfile",
|
||||
context = "./target_chains/cosmwasm/devnet",
|
||||
dockerfile = "./target_chains/cosmwasm/devnet/Dockerfile",
|
||||
)
|
||||
|
||||
docker_build(
|
||||
ref = "cosmwasm-contracts",
|
||||
context = ".",
|
||||
dockerfile = "tilt-devnet/docker-images/Dockerfile.cosmwasm",
|
||||
dockerfile = "tilt_devnet/docker_images/Dockerfile.cosmwasm",
|
||||
)
|
||||
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/terra-devnet.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/terra-devnet.yaml")
|
||||
|
||||
k8s_resource(
|
||||
"terra-terrad",
|
||||
|
@ -317,10 +317,10 @@ k8s_resource(
|
|||
docker_build(
|
||||
ref = "prometheus",
|
||||
context = ".",
|
||||
dockerfile = "tilt-devnet/docker-images/Dockerfile.prometheus",
|
||||
dockerfile = "tilt_devnet/docker_images/Dockerfile.prometheus",
|
||||
)
|
||||
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/prometheus.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/prometheus.yaml")
|
||||
|
||||
k8s_resource(
|
||||
"prometheus",
|
||||
|
@ -332,10 +332,10 @@ k8s_resource(
|
|||
docker_build(
|
||||
ref = "multisig",
|
||||
context = ".",
|
||||
dockerfile = "tilt-devnet/docker-images/Dockerfile.multisig",
|
||||
dockerfile = "tilt_devnet/docker_images/Dockerfile.multisig",
|
||||
)
|
||||
|
||||
k8s_yaml_with_ns("tilt-devnet/k8s/multisig.yaml")
|
||||
k8s_yaml_with_ns("tilt_devnet/k8s/multisig.yaml")
|
||||
|
||||
k8s_resource(
|
||||
"multisig",
|
||||
|
|
|
@ -3,8 +3,8 @@ SPY_SERVICE_HOST=0.0.0.0:7072
|
|||
|
||||
# Filters (if provided) should be valid JSON like below:
|
||||
# These filters tell the spy to only retrieve messages sent from certain chains/contracts.
|
||||
# See the docker-compose.<network>.yaml files in the price-service directory for the appropriate
|
||||
# configuration for a testnet/mainnet pyth price-service deployment.
|
||||
# See the docker-compose.<network>.yaml files in the price_service directory for the appropriate
|
||||
# configuration for a testnet/mainnet pyth price_service deployment.
|
||||
SPY_SERVICE_FILTERS=[{"chain_id":1,"emitter_address":"71f8dcb863d176e2c420ad6610cf687359612b6fb392e0642b0ca6b1f186aa3b"}]
|
||||
|
||||
# Number of seconds to sync with spy to be sure to have latest messages
|
|
@ -10,7 +10,7 @@ WORKDIR ${BASE_PATH}/${P2W_SDK_REL_PATH}
|
|||
COPY --chown=pyth:pyth ${P2W_SDK_REL_PATH} .
|
||||
RUN npm ci && npm run build && npm cache clean --force
|
||||
|
||||
ARG PRICE_SERVICE_REL_PATH=price-service
|
||||
ARG PRICE_SERVICE_REL_PATH=price_service
|
||||
WORKDIR ${BASE_PATH}/${PRICE_SERVICE_REL_PATH}
|
||||
COPY --chown=pyth:pyth ${PRICE_SERVICE_REL_PATH} .
|
||||
RUN npm ci && npm run build && npm cache clean --force
|
|
@ -57,7 +57,7 @@ Then, build the image from [the repo root](../../../) like below. It will create
|
|||
local image named `pyth_price_service`.
|
||||
|
||||
```
|
||||
$ docker buildx build -f price-service/Dockerfile.price_service -t pyth_price_service .
|
||||
$ docker buildx build -f price_service/Dockerfile.price_service -t pyth_price_service .
|
||||
```
|
||||
|
||||
If you wish to build price service without docker, please follow the instruction of the price service
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue