Troubleshoot Solana Price Feeds Contract
Fix build and runtime issues for Pyth price feeds on Solana and SVM chains
This reference page is designed to help you troubleshoot common issues you may encounter when using Pyth Price Feeds on SVM chains. Follow the steps provided below to diagnose and resolve the issue.
-
error[E0277]: the trait bound PriceUpdateV2: anchor_lang::AccountDeserialize is not satisfiedThis error happens when a program using the
pyth-solana-receiver-sdkfails to compile. It is caused by ananchor-langversion mismatch. Make sure the transitive version ofanchor-langbrought bypyth-solana-receiver-sdkmatches the version ofanchor-langof your program'sCargo.toml.You can fix it by following these steps:
- Check the version of
anchor-langin yourCargo.toml(in the example0.29.0) call itx.y.z - Check the version of
anchor-langin thepyth-solana-receiver-sdktree inCargo.lock(in the example0.30.1) call ita.b.c - Run
cargo update -p anchor-lang@a.b.c --precise x.y.zreplacinga.b.candx.y.zby the versions in the previous steps. For example:
cargo update -p anchor-lang@0.30.1 --precise 0.29.0
- Check the version of