Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6,362 changes: 4,228 additions & 2,134 deletions lazer/Cargo.lock

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ idl-build = ["anchor-lang/idl-build"]
[dependencies]
pyth-lazer-protocol = { version = "0.1.2", path = "../../../../sdk/rust/protocol" }

anchor-lang = "0.29.0"
anchor-lang = "0.32.1"
bytemuck = "1.4.0"
byteorder = "1.4.3"
thiserror = "1.0"
solana-program = "1.16"
solana-program = "2.2"

[dev-dependencies]
hex = "0.4.3"
solana-program-test = "1.18.26"
solana-sdk = "1.18.26"
solana-program-test = "2"
solana-sdk = "2.2"
tokio = { version = "1.40.0", features = ["full"] }
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ use {
crate::Storage,
anchor_lang::{
prelude::{borsh, AccountInfo, Clock, ProgramError, Pubkey, SolanaSysvar},
solana_program::{
ed25519_program, program_memory::sol_memcmp, pubkey::PUBKEY_BYTES, sysvar,
},
AnchorDeserialize, AnchorSerialize,
},
bytemuck::{cast_slice, checked::try_cast_slice, Pod, Zeroable},
byteorder::{ByteOrder, LE},
solana_program::{ed25519_program, program_memory::sol_memcmp, pubkey::PUBKEY_BYTES, sysvar},
thiserror::Error,
};

Expand Down
4 changes: 2 additions & 2 deletions lazer/sdk/solana/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ edition = "2021"
pyth-lazer-protocol = { path = "../rust/protocol" }
pyth-lazer-solana-contract = { path = "../../contracts/solana/programs/pyth-lazer-solana-contract", features = ["no-entrypoint"] }

solana-program = "1.16"
solana-program = "2"
bytemuck = { version = "1.4.0", features = ["derive"] }
byteorder = "1.4.3"
thiserror = "1.0"
anchor-lang = "0.29.0"
anchor-lang = "0.32.1"
11 changes: 6 additions & 5 deletions pythnet/pythnet_sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ name = "pythnet_sdk"
[features]
test-utils = ["dep:wormhole-vaas-serde", "dep:serde_wormhole", "dep:libsecp256k1", "dep:rand"]
solana-program = ["dep:solana-program", "dep:anchor-lang", "dep:proc-macro2"]
idl-build = ["anchor-lang/idl-build"]

[dependencies]
bincode = "1.3.1"
Expand All @@ -32,16 +33,16 @@ serde_wormhole = {version ="0.1.0", optional = true}
wormhole-vaas-serde = {version = "0.1.0", optional = true}
libsecp256k1 = {version ="0.7.1", optional = true}
rand = {version = "0.8.5", optional = true}
solana-program = {version = ">=1.13.6", optional = true}
anchor-lang = {version = ">=0.28.0", optional = true}
proc-macro2 = {version = "=1.0.79", optional = true} # pinned to 1.0.79 to compilation errors with newer versions, remove this if it compiles fine without
solana-program = {version = "2", optional = true}
anchor-lang = {version = "0.32.1", optional = true}
proc-macro2 = {version = "1.0.86", optional = true}

[dev-dependencies]
base64 = "0.21.0"
rand = "0.7.0"
serde_json = "1.0.96"
solana-client = ">=1.13.6"
solana-sdk = ">=1.13.6"
solana-client = "2"
solana-sdk = "2"
proptest = "1.1.0"

[package.metadata.docs.rs]
Expand Down
2 changes: 1 addition & 1 deletion pythnet/pythnet_sdk/src/messages.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ pub type FeedId = [u8; 32];
)]

pub struct PriceFeedMessage {
pub feed_id: FeedId,
pub feed_id: [u8; 32],
pub price: i64,
pub conf: u64,
pub exponent: i32,
Expand Down
12 changes: 9 additions & 3 deletions pythnet/pythnet_sdk/src/test_utils/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ use {
thread_rng,
},
serde_wormhole::RawMessage,
solana_program::{
pubkey,
pubkey::Pubkey,
},
wormhole_sdk::{
vaa::{
Body,
Expand All @@ -50,7 +54,6 @@ use {
Chain,
Vaa,
},
solana_program::{pubkey, pubkey::Pubkey}
};

pub struct DataSource {
Expand All @@ -59,8 +62,11 @@ pub struct DataSource {
}

pub const DEFAULT_DATA_SOURCE: DataSource = DataSource {
address: Address([225, 1, 250, 237, 172, 88, 81, 227, 43, 155, 35, 181, 249, 65, 26, 140, 43, 172, 74, 174, 62, 212, 221, 123, 129, 29, 209, 167, 46, 164, 170, 113]),
chain: Chain::Pythnet,
address: Address([
225, 1, 250, 237, 172, 88, 81, 227, 43, 155, 35, 181, 249, 65, 26, 140, 43, 172, 74, 174,
62, 212, 221, 123, 129, 29, 209, 167, 46, 164, 170, 113,
]),
chain: Chain::Pythnet,
};

pub const DEFAULT_GOVERNANCE_SOURCE: DataSource = DataSource {
Expand Down
6 changes: 6 additions & 0 deletions pythnet/pythnet_sdk/src/wire.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ pub mod v1 {
pub proof: MerklePath<Keccak160>,
}

// placeholder implementation for `anchor build` IDL to compile
// its ok because this type and its constituents are not used within the drift IDL
#[cfg(feature = "idl-build")]
impl anchor_lang::IdlBuild for MerklePriceUpdate {
}

#[derive(Clone, Debug, Hash, PartialEq, Serialize, Deserialize)]
pub struct WormholeMessage {
pub magic: [u8; 4],
Expand Down
Loading
Loading