Эх сурвалжийг харах

refactor: move pythnet_sdk to sdks/pythnet_sdk/rust

Move the pythnet_sdk directory to a more appropriate location under sdks/
while maintaining all functionality and dependencies.

Co-Authored-By: Jayant Krishnamurthy <jayant@dourolabs.xyz>
Devin AI 9 сар өмнө
parent
commit
608021f2fa
29 өөрчлөгдсөн 8 нэмэгдсэн , 8 устгасан
  1. 1 1
      .github/workflows/publish-pythnet-sdk.yml
  2. 0 0
      sdks/pythnet_sdk/rust/.gitignore
  3. 0 0
      sdks/pythnet_sdk/rust/Cargo.toml
  4. 0 0
      sdks/pythnet_sdk/rust/examples/generate_pyth_data.rs
  5. 0 0
      sdks/pythnet_sdk/rust/rust-toolchain
  6. 0 0
      sdks/pythnet_sdk/rust/src/accumulators.rs
  7. 0 0
      sdks/pythnet_sdk/rust/src/accumulators/merkle.rs
  8. 0 0
      sdks/pythnet_sdk/rust/src/accumulators/mul.rs
  9. 0 0
      sdks/pythnet_sdk/rust/src/error.rs
  10. 0 0
      sdks/pythnet_sdk/rust/src/hashers.rs
  11. 0 0
      sdks/pythnet_sdk/rust/src/hashers/keccak256.rs
  12. 0 0
      sdks/pythnet_sdk/rust/src/hashers/keccak256_160.rs
  13. 0 0
      sdks/pythnet_sdk/rust/src/hashers/prime.rs
  14. 0 0
      sdks/pythnet_sdk/rust/src/lib.rs
  15. 0 0
      sdks/pythnet_sdk/rust/src/messages.rs
  16. 0 0
      sdks/pythnet_sdk/rust/src/test_utils/mod.rs
  17. 0 0
      sdks/pythnet_sdk/rust/src/wire.rs
  18. 0 0
      sdks/pythnet_sdk/rust/src/wire/array.rs
  19. 0 0
      sdks/pythnet_sdk/rust/src/wire/de.rs
  20. 0 0
      sdks/pythnet_sdk/rust/src/wire/prefixed_vec.rs
  21. 0 0
      sdks/pythnet_sdk/rust/src/wire/ser.rs
  22. 0 0
      sdks/pythnet_sdk/rust/src/wormhole.rs
  23. 1 1
      target_chains/near/example/Cargo.toml
  24. 1 1
      target_chains/near/receiver/Cargo.toml
  25. 1 1
      target_chains/solana/Dockerfile
  26. 1 1
      target_chains/solana/cli/Cargo.toml
  27. 1 1
      target_chains/solana/common_test_utils/Cargo.toml
  28. 1 1
      target_chains/solana/programs/pyth-solana-receiver/Cargo.toml
  29. 1 1
      target_chains/solana/pyth_solana_receiver_sdk/Cargo.toml

+ 1 - 1
.github/workflows/publish-pythnet-sdk.yml

@@ -15,4 +15,4 @@ jobs:
       - run: cargo publish --token ${CARGO_REGISTRY_TOKEN}
         env:
           CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
-        working-directory: "pythnet/pythnet_sdk"
+        working-directory: "sdks/pythnet_sdk/rust"

+ 0 - 0
pythnet/pythnet_sdk/.gitignore → sdks/pythnet_sdk/rust/.gitignore


+ 0 - 0
pythnet/pythnet_sdk/Cargo.toml → sdks/pythnet_sdk/rust/Cargo.toml


+ 0 - 0
pythnet/pythnet_sdk/examples/generate_pyth_data.rs → sdks/pythnet_sdk/rust/examples/generate_pyth_data.rs


+ 0 - 0
pythnet/pythnet_sdk/rust-toolchain → sdks/pythnet_sdk/rust/rust-toolchain


+ 0 - 0
pythnet/pythnet_sdk/src/accumulators.rs → sdks/pythnet_sdk/rust/src/accumulators.rs


+ 0 - 0
pythnet/pythnet_sdk/src/accumulators/merkle.rs → sdks/pythnet_sdk/rust/src/accumulators/merkle.rs


+ 0 - 0
pythnet/pythnet_sdk/src/accumulators/mul.rs → sdks/pythnet_sdk/rust/src/accumulators/mul.rs


+ 0 - 0
pythnet/pythnet_sdk/src/error.rs → sdks/pythnet_sdk/rust/src/error.rs


+ 0 - 0
pythnet/pythnet_sdk/src/hashers.rs → sdks/pythnet_sdk/rust/src/hashers.rs


+ 0 - 0
pythnet/pythnet_sdk/src/hashers/keccak256.rs → sdks/pythnet_sdk/rust/src/hashers/keccak256.rs


+ 0 - 0
pythnet/pythnet_sdk/src/hashers/keccak256_160.rs → sdks/pythnet_sdk/rust/src/hashers/keccak256_160.rs


+ 0 - 0
pythnet/pythnet_sdk/src/hashers/prime.rs → sdks/pythnet_sdk/rust/src/hashers/prime.rs


+ 0 - 0
pythnet/pythnet_sdk/src/lib.rs → sdks/pythnet_sdk/rust/src/lib.rs


+ 0 - 0
pythnet/pythnet_sdk/src/messages.rs → sdks/pythnet_sdk/rust/src/messages.rs


+ 0 - 0
pythnet/pythnet_sdk/src/test_utils/mod.rs → sdks/pythnet_sdk/rust/src/test_utils/mod.rs


+ 0 - 0
pythnet/pythnet_sdk/src/wire.rs → sdks/pythnet_sdk/rust/src/wire.rs


+ 0 - 0
pythnet/pythnet_sdk/src/wire/array.rs → sdks/pythnet_sdk/rust/src/wire/array.rs


+ 0 - 0
pythnet/pythnet_sdk/src/wire/de.rs → sdks/pythnet_sdk/rust/src/wire/de.rs


+ 0 - 0
pythnet/pythnet_sdk/src/wire/prefixed_vec.rs → sdks/pythnet_sdk/rust/src/wire/prefixed_vec.rs


+ 0 - 0
pythnet/pythnet_sdk/src/wire/ser.rs → sdks/pythnet_sdk/rust/src/wire/ser.rs


+ 0 - 0
pythnet/pythnet_sdk/src/wormhole.rs → sdks/pythnet_sdk/rust/src/wormhole.rs


+ 1 - 1
target_chains/near/example/Cargo.toml

@@ -15,7 +15,7 @@ hex                        = { version = "0.4.3" }
 near-sdk                   = { version = "5.5.0" }
 num-traits                 = { version = "0.2.15" }
 num-derive                 = { version = "0.3.3" }
-pythnet-sdk                = { path = "../../../pythnet/pythnet_sdk" }
+pythnet-sdk                = { path = "../../../sdks/pythnet_sdk/rust" }
 pyth-near                  = { path = "../receiver", features = ["library"] }
 strum                      = { version = "0.24.1", features = ["derive"] }
 thiserror                  = { version = "1.0.38" }

+ 1 - 1
target_chains/near/receiver/Cargo.toml

@@ -22,7 +22,7 @@ num-traits                 = { version = "0.2.15" }
 num-derive                 = { version = "0.3.3" }
 pyth-wormhole-attester-sdk = { path = "../../../wormhole_attester/sdk/rust" }
 pyth-sdk                   = { version = "0.7.0" }
-pythnet-sdk                = { path = "../../../pythnet/pythnet_sdk" }
+pythnet-sdk                = { path = "../../../sdks/pythnet_sdk/rust" }
 schemars                   = { version = "0.8.21" }
 serde_wormhole             = { git = "https://github.com/wormhole-foundation/wormhole", tag="rust-sdk-2024-01-25" }
 strum                      = { version = "0.24.1", features = ["derive"] }

+ 1 - 1
target_chains/solana/Dockerfile

@@ -8,7 +8,7 @@ FROM backpackapp/build:v0.29.0@sha256:9aee169b2d8b89b4a4243419ae35c176773136e78d
 
 WORKDIR /workspace
 
-COPY pythnet/pythnet_sdk pythnet/pythnet_sdk
+COPY sdks/pythnet_sdk/rust sdks/pythnet_sdk/rust
 COPY target_chains/solana target_chains/solana
 
 WORKDIR /workspace/target_chains/solana

+ 1 - 1
target_chains/solana/cli/Cargo.toml

@@ -13,7 +13,7 @@ anchor-client = { workspace = true }
 clap = { version = "3.2.22", features = ["derive"] }
 pyth-solana-receiver = { path = "../programs/pyth-solana-receiver" }
 wormhole-solana = { git = "https://github.com/guibescos/wormhole", branch = "reisen/sdk-solana" } # Used for initializing the wormhole receiver
-pythnet-sdk = { path = "../../../pythnet/pythnet_sdk", version = "2.0.0" }
+pythnet-sdk = { path = "../../../sdks/pythnet_sdk/rust", version = "2.0.0" }
 wormhole-vaas-serde = { workspace = true }
 serde_wormhole = { workspace = true }
 hex = "0.4.3"

+ 1 - 1
target_chains/solana/common_test_utils/Cargo.toml

@@ -20,7 +20,7 @@ lazy_static = "1.4.0"
 program-simulator = { path = "../program_simulator" }
 wormhole-vaas-serde = { workspace = true }
 serde_wormhole = { workspace = true }
-pythnet-sdk = { path = "../../../pythnet/pythnet_sdk", features = ["test-utils"] }
+pythnet-sdk = { path = "../../../sdks/pythnet_sdk/rust", features = ["test-utils"] }
 anchor-lang = { workspace = true }
 solana-program = { workspace = true }
 pyth-solana-receiver = { path = "../programs/pyth-solana-receiver" }

+ 1 - 1
target_chains/solana/programs/pyth-solana-receiver/Cargo.toml

@@ -17,7 +17,7 @@ test-bpf = []
 
 [dependencies]
 anchor-lang = { workspace = true }
-pythnet-sdk = { path = "../../../../pythnet/pythnet_sdk", features = [
+pythnet-sdk = { path = "../../../../sdks/pythnet_sdk/rust", features = [
     "solana-program",
 ] }
 solana-program = { workspace = true }

+ 1 - 1
target_chains/solana/pyth_solana_receiver_sdk/Cargo.toml

@@ -15,7 +15,7 @@ name = "pyth_solana_receiver_sdk"
 [dependencies]
 anchor-lang = ">=0.28.0"
 hex = ">=0.4.3"
-pythnet-sdk = { path = "../../../pythnet/pythnet_sdk", version = "2.1.0", features = [
+pythnet-sdk = { path = "../../../sdks/pythnet_sdk/rust", version = "2.1.0", features = [
     "solana-program",
 ] }
 solana-program = ">=1.16.0, <2.0.0"