Skip to content

Commit 197139e

Browse files
feat(pyth-solana-receiver-sdk): upgrade anchor-lang to 0.31.1 (#3026)
* solana program 2 * remove solana_program::pubkey imports * fix test * don't run pyth-solana-receiver-sdk doctests in CI * doc * remove SDK from workspace * remove SDK from workspace * patch pythnet-sdk import * suppress borsh deprecation warning * comments * update comment * fix ci * pr comments --------- Co-authored-by: Guillermo Bescos <[email protected]>
1 parent 2bc4785 commit 197139e

File tree

12 files changed

+3223
-37
lines changed

12 files changed

+3223
-37
lines changed

.github/workflows/ci-solana-contract.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,5 @@ jobs:
4242
if: success() || failure()
4343
- name: Run sdk tests
4444
run: cargo test --package pyth-solana-receiver-sdk
45+
working-directory: target_chains/solana/pyth_solana_receiver_sdk
4546
if: success() || failure()

target_chains/solana/Cargo.lock

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

target_chains/solana/Cargo.toml

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
[workspace]
2-
members = [
3-
"programs/*",
4-
"cli/",
5-
"program_simulator/",
6-
"pyth_solana_receiver_sdk/",
7-
"common_test_utils",
8-
]
2+
members = ["programs/*", "cli/", "program_simulator/", "common_test_utils"]
93

104
exclude = [
11-
"programs/pyth-price-store"
12-
]
5+
"programs/pyth-price-store",
6+
"pyth_solana_receiver_sdk",
7+
] # pyth_solana_receiver_sdk is excluded because it uses a later anchor-lang version than the contract
138

149
[profile.release]
1510
overflow-checks = true
@@ -21,12 +16,15 @@ incremental = false
2116
codegen-units = 1
2217

2318
[workspace.dependencies]
24-
wormhole-core-bridge-solana = {git = "https://github.com/wormhole-foundation/wormhole", rev = "7bd40b595e22c5512dfaa2ed8e6d7441df743a69"}
25-
wormhole-vaas-serde = "0.1.0"
19+
wormhole-core-bridge-solana = { git = "https://github.com/wormhole-foundation/wormhole", rev = "7bd40b595e22c5512dfaa2ed8e6d7441df743a69" }
20+
wormhole-vaas-serde = "0.1.0"
2621
serde_wormhole = "0.1.0"
2722
anchor-lang = "0.28.0"
2823
anchor-client = "0.28.0"
2924
solana-program = "1.16.20"
3025
solana-program-test = "1.16.20"
3126
solana-sdk = "1.16.20"
3227
solana-client = "1.16.20"
28+
29+
[patch.crates-io]
30+
pythnet-sdk = { path = "../../pythnet/pythnet_sdk" } # Avoid clashing modules, use the local pythnet_sdk instead of the one from crates.io, (which is brought in by `pyth-solana-receiver-sdk==0.6.1`)

target_chains/solana/cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ serde_wormhole = { workspace = true }
1919
hex = "0.4.3"
2020
borsh = "0.9.3" # Old version of borsh needed for wormhole-solana
2121
wormhole-core-bridge-solana = { workspace = true }
22-
pyth-solana-receiver-sdk = { path = "../pyth_solana_receiver_sdk" }
22+
pyth-solana-receiver-sdk = "0.6.1" # This is the highest version of pyth-solana-receiver-sdk that is compatible with the anchor-lang version used in the contract (0.28.0)

target_chains/solana/common_test_utils/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ anchor-lang = { workspace = true }
2525
solana-program = { workspace = true }
2626
pyth-solana-receiver = { path = "../programs/pyth-solana-receiver" }
2727
wormhole-core-bridge-solana = {workspace = true}
28-
pyth-solana-receiver-sdk = { path = "../pyth_solana_receiver_sdk"}
28+
pyth-solana-receiver-sdk = "0.6.1" # This is the highest version of pyth-solana-receiver-sdk that is compatible with the anchor-lang version used in the contract (0.28.0)

target_chains/solana/programs/pyth-push-oracle/Cargo.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@ anchor-lang = { workspace = true }
2020
pythnet-sdk = { path = "../../../../pythnet/pythnet_sdk" }
2121
solana-program = { workspace = true }
2222
byteorder = "1.4.3"
23-
pyth-solana-receiver-sdk = { path = "../../pyth_solana_receiver_sdk"}
23+
pyth-solana-receiver-sdk = "0.6.1" # This is the highest version of pyth-solana-receiver-sdk that is compatible with the anchor-lang version used in the contract (0.28.0)
2424

2525
[dev-dependencies]
26-
pyth-solana-receiver = { path = "../pyth-solana-receiver", features = ["no-entrypoint"]}
26+
pyth-solana-receiver = { path = "../pyth-solana-receiver", features = [
27+
"no-entrypoint",
28+
] }
2729
solana-sdk = { workspace = true }
2830
tokio = "1.14.1"
2931
program-simulator = { path = "../../program_simulator" }

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ wormhole-raw-vaas = { version = "0.1.3", features = [
2727
"ruint",
2828
"on-chain",
2929
], default-features = false }
30-
pyth-solana-receiver-sdk = { path = "../../pyth_solana_receiver_sdk" }
30+
pyth-solana-receiver-sdk = "0.6.1" # This is the highest version of pyth-solana-receiver-sdk that is compatible with the anchor-lang version used in the contract (0.28.0)
3131
rand = "0.8.5"
3232

3333
[dev-dependencies]

0 commit comments

Comments
 (0)