Skip to content

Commit

Permalink
Add express relay rust client (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
danimhr authored Dec 16, 2024
1 parent a63eb19 commit 9b2320e
Show file tree
Hide file tree
Showing 68 changed files with 3,934 additions and 1,896 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci-pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2023-03-01
components: rustfmt, clippy
toolchain: 1.83.0
components: clippy
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly-2024-04-10
components: rustfmt, clippy
toolchain: nightly-2024-12-03
components: rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/publish-express-relay-api-types.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish Express Relay Client to crates.io

on:
push:
tags:
- express-relay-api-types-v*
jobs:
publish-express-relay-client:
name: Publish Express Relay Client
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2

- run: cargo publish -p express-relay-api-types --token ${CARGO_REGISTRY_TOKEN}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.PYTH_NETWORK_PYTH_OPS_CARGO_PUSH }}
17 changes: 17 additions & 0 deletions .github/workflows/publish-rust-express-relay-client.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish Express Relay Client to crates.io

on:
push:
tags:
- rust-express-relay-client-v*
jobs:
publish-express-relay-client:
name: Publish Express Relay Client
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Publish Express Relay Client
run: cargo publish -p express-relay-client --token ${CARGO_REGISTRY_TOKEN}
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.PYTH_NETWORK_PYTH_OPS_CARGO_PUSH }}
39 changes: 14 additions & 25 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ repos:
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: "^sdk/rust/abi/.*"
- id: check-added-large-files
exclude: package-lock.json
# Hook to format many type of files in the repo
Expand All @@ -15,52 +16,40 @@ repos:
additional_dependencies:
- "[email protected]"
- "[email protected]"
exclude: "^sdk/rust/abi/.*"
- repo: local
hooks:
# Hooks for auction server
- id: cargo-fmt-auction-server
name: Cargo format for auction server
# Hooks for workspace
- id: cargo-fmt-workspace
name: Cargo format for workspace
language: "rust"
entry: cargo +nightly-2024-04-10 fmt --manifest-path ./auction-server/Cargo.toml --all -- --config-path rustfmt.toml
entry: cargo +nightly-2024-12-03 fmt --manifest-path ./Cargo.toml --all -- --config-path rustfmt.toml
pass_filenames: false
files: auction-server
- id: cargo-clippy-auction-server
name: Cargo clippy for auction server
files: .
- id: cargo-clippy-workspace
name: Cargo clippy for workspace
language: "rust"
entry: cargo +stable clippy --manifest-path ./auction-server/Cargo.toml --tests -- -D warnings
entry: cargo +stable clippy --manifest-path ./Cargo.toml --tests -- -D warnings
pass_filenames: false
files: auction-server
files: .
# Hooks for vault-simulator
- id: cargo-fmt-vault-simulator
name: Cargo format for vault simulator
language: "rust"
entry: cargo +nightly-2024-04-10 fmt --manifest-path ./vault-simulator/Cargo.toml --all -- --config-path rustfmt.toml
entry: cargo fmt --manifest-path ./vault-simulator/Cargo.toml --all -- --config-path rustfmt.toml
pass_filenames: false
files: vault-simulator
- id: cargo-clippy-vault-simulator
name: Cargo clippy for vault simulator
language: "rust"
entry: cargo +stable clippy --manifest-path ./vault-simulator/Cargo.toml --tests -- -D warnings
entry: cargo clippy --manifest-path ./vault-simulator/Cargo.toml --tests -- -D warnings
pass_filenames: false
files: vault-simulator
# Hooks for gas-oracle
- id: cargo-fmt-gas-oracle
name: Cargo format for gas oracle
language: "rust"
entry: cargo +nightly-2024-04-10 fmt --manifest-path ./gas-oracle/Cargo.toml --all -- --config-path rustfmt.toml
pass_filenames: false
files: gas-oracle
- id: cargo-clippy-gas-oracle
name: Cargo clippy for gas oracle
language: "rust"
entry: cargo +stable clippy --manifest-path ./gas-oracle/Cargo.toml --tests -- -D warnings
pass_filenames: false
files: gas-oracle
# Hooks for contracts-svm
- id: cargo-fmt-contracts-svm
name: Cargo format for svm contracts
language: "rust"
entry: cargo +nightly-2024-04-10 fmt --manifest-path ./contracts/svm/Cargo.toml --all -- --config-path rustfmt.toml
entry: cargo +nightly-2024-12-03 fmt --manifest-path ./contracts/svm/Cargo.toml --all -- --config-path rustfmt.toml
pass_filenames: false
files: contracts/svm
- id: cargo-clippy-contracts-svm
Expand Down
5 changes: 2 additions & 3 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"rust-analyzer.linkedProjects": [
"./auction-server/Cargo.toml",
"./gas-oracle/Cargo.toml",
"./vault-simulator/Cargo.toml",
"./contracts/svm/Cargo.toml"
"./contracts/svm/Cargo.toml",
"./Cargo.toml"
]
}
Loading

0 comments on commit 9b2320e

Please sign in to comment.