Troubleshoot Solana Price Feeds Contract
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 satisfied
This error happens when a program using the
pyth-solana-receiver-sdk
(opens in a new tab) fails to compile. It is caused by ananchor-lang
version mismatch. Make sure the transitive version ofanchor-lang
brought bypyth-solana-receiver-sdk
matches the version ofanchor-lang
of your program'sCargo.toml
.You can fix it by following these steps:
- Check the version of
anchor-lang
in yourCargo.toml
(opens in a new tab) (in the example0.29.0
) call itx.y.z
- Check the version of
anchor-lang
in thepyth-solana-receiver-sdk
tree inCargo.lock
(opens in a new tab) (in the example0.30.1
) call ita.b.c
- Run
cargo update -p anchor-lang@a.b.c --precise x.y.z
replacinga.b.c
andx.y.z
by the versions in the previous steps. For example:
cargo update -p anchor-lang@0.30.1 --precise 0.29.0
- Check the version of
Last updated on