Pyth-solana-receiver-sdk supported Anchor versions

Docs says this (https://docs.pyth.network/price-feeds/use-real-time-data/solana#rust-sdk):
At the time of writing, pyth-solana-receiver-sdk is compatible with Anchor v0.28.0, v0.29.0, and v0.30.1. If you are on v0.30.0 or any other version, please move to v0.30.1.

I switched from v0.31.1 to v0.30.1 but I’m getting this error:

the trait bound PriceUpdateV2: anchor_lang::AccountSerialize is not satisfied
the trait bound PriceUpdateV2: anchor_lang::AccountDeserialize is not satisfied

This is part of my code:

pub price_update: Account<'info, PriceUpdateV2>,

Which anchor versions does pyth-solana-receiver-sdk support?

gm!

Pyth does support 0.30.1 as seen in this repo: anchor-pyth/programs/anchor-pyth at v0.30.1 · guibescos/anchor-pyth · GitHub
Sometimes, there can be issues with transitive dependencies or other issues where even though the version specified in your Cargo.toml is supported the actual version present in the Cargo.lock is not. Refer to this troubleshoot for some ideas: https://docs.pyth.network/price-feeds/troubleshoot/svm.

Thanks for patience and have a good week.

1 Like