Procházet zdrojové kódy

chore: support anchor 0.32.1 in pyth-solana-receiver-sdk (#3159)

* chore(solana-sdk): support anchor 0.32.1

* chore(pythnet-sdk): align anchor deps with 0.32.1

* Revert "chore(pythnet-sdk): align anchor deps with 0.32.1"

This reverts commit 6d6a6cf97afc4a72bdff56c280f8555794ad6321.

* bump ver

* use solana_borsh instead of solana
Tejas Badadare před 2 týdny
rodič
revize
68d57efe32

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 118 - 516
target_chains/solana/pyth_solana_receiver_sdk/Cargo.lock


+ 5 - 2
target_chains/solana/pyth_solana_receiver_sdk/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name = "pyth-solana-receiver-sdk"
-version = "1.0.1"
+version = "1.1.0"
 description = "SDK for the Pyth Solana Receiver program"
 authors = ["Pyth Data Association"]
 repository = "https://github.com/pyth-network/pyth-crosschain"
@@ -13,8 +13,11 @@ name = "pyth_solana_receiver_sdk"
 
 
 [dependencies]
-anchor-lang = "0.31.1"
+anchor-lang = "0.32.1"
 hex = "0.4.3"
 pythnet-sdk = { path = "../../../pythnet/pythnet_sdk", version = "2.3.1", features = [
     "solana-program",
 ] }
+
+[dev-dependencies]
+solana-borsh = "2.2.1" # Needed for borsh0_10 compatibility

+ 3 - 2
target_chains/solana/pyth_solana_receiver_sdk/src/price_update.rs

@@ -323,15 +323,16 @@ pub mod tests {
             error::GetPriceError,
             price_update::{Price, PriceUpdateV2, TwapPrice, TwapUpdate, VerificationLevel},
         },
-        anchor_lang::{prelude::*, solana_program::borsh0_10},
+        anchor_lang::prelude::*,
         pythnet_sdk::messages::PriceFeedMessage,
+        solana_borsh::v0_10,
     };
 
     #[test]
     fn check_size() {
         // borsh0_10 is deprecated, v1::get_packed_len should be used in the future
         #[allow(deprecated)]
-        let len = PriceUpdateV2::DISCRIMINATOR.len() + borsh0_10::get_packed_len::<PriceUpdateV2>();
+        let len = PriceUpdateV2::DISCRIMINATOR.len() + v0_10::get_packed_len::<PriceUpdateV2>();
         assert_eq!(len, PriceUpdateV2::LEN);
     }
 

Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů