5

I am getting this type of errors

the trait bound `Pubkey: BorshSerialize` is not satisfied
   --> src/system_program.rs:343:10
    |
343 | #[derive(Accounts)]
    |          ^^^^^^^^ the trait `BorshSerialize` is not implemented for `Pubkey`
    |
    = help: the following other types implement trait `BorshSerialize`:
              &T
              ()
              (T0, T1)
              (T0, T1, T2)
              (T0, T1, T2, T3)
              (T0, T1, T2, T3, T4)
              (T0, T1, T2, T3, T4, T5)
              (T0, T1, T2, T3, T4, T5, T6)
            and 81 others
    = help: see issue #48214
    = help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
    = note: this error originates in the derive macro `Accounts` (in Nightly builds, run with -Z macro-backtrace for more info)

this is my Cargo.toml


[dependencies]
anchor-lang = {version = "0.28.0", features = ["init-if-needed"]}
anchor-spl = {version = "0.28.0"}
#borsh = {version = "^0.10.3", features = ["const-generics"]}
mpl-token-metadata = {version = "1.12.2", features = ["no-entrypoint"]}
solana-program = {version = "1.14"}
streamflow-sdk = {version = "0.6.0", features = ["cpi"]}

I tried downgrading versions of solana and borsh to make solana-programcrate and mpl-token-metadata compatible like said in this Question

But the streamflow-sdk requires 10.3 version of borsh.

1
  • Have you tried downgrading streamflow-sdk to 0.5.3?
    – Orion
    Commented Jul 13, 2023 at 0:32

1 Answer 1

3

You can’t use anchor 28 with mpl token metadata until Metaplex updates their libraries. Downgrade to anchor 26 with Solana 1.14

Check the Anchor issues for more info

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.