Skip to content

Commit

Permalink
changed anchor serailze/deserailize to borsh (#1765)
Browse files Browse the repository at this point in the history
* changed anchor serailze/deserailize to borsh

* Update Cargo.toml

changed pyth-solana-receiver-sdk to 0.3.1

* cargo lock

---------

Co-authored-by: Guillermo Bescos <[email protected]>
  • Loading branch information
mubarizkyc and guibescos authored Jul 15, 2024
1 parent 0db4090 commit a3147fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion target_chains/solana/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion target_chains/solana/pyth_solana_receiver_sdk/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyth-solana-receiver-sdk"
version = "0.3.0"
version = "0.3.1"
description = "SDK for the Pyth Solana Receiver program"
authors = ["Pyth Data Association"]
repository = "https://github.com/pyth-network/pyth-crosschain"
Expand Down
14 changes: 9 additions & 5 deletions target_chains/solana/pyth_solana_receiver_sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ use {
declare_id,
prelude::*,
},
borsh::{
BorshDeserialize,
BorshSerialize,
},
pythnet_sdk::wire::v1::MerklePriceUpdate,
solana_program::{
pubkey,
Expand All @@ -21,15 +25,15 @@ declare_id!("rec5EKMGg6MxZYaMdyBfgwp4d5rB9T1VQH5pJv5LtFJ");

pub const PYTH_PUSH_ORACLE_ID: Pubkey = pubkey!("pythWSnswVUd12oZpeFP8e9CVaEqJg25g1Vtc2biRsT");

#[derive(Debug, AnchorSerialize, AnchorDeserialize, Clone)]
pub struct PostUpdateAtomicParams {
pub vaa: Vec<u8>,
#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
pub struct PostUpdateParams {
pub merkle_price_update: MerklePriceUpdate,
pub treasury_id: u8,
}

#[derive(Debug, AnchorSerialize, AnchorDeserialize, Clone)]
pub struct PostUpdateParams {
#[derive(Debug, BorshSerialize, BorshDeserialize, Clone)]
pub struct PostUpdateAtomicParams {
pub vaa: Vec<u8>,
pub merkle_price_update: MerklePriceUpdate,
pub treasury_id: u8,
}

0 comments on commit a3147fe

Please sign in to comment.