1

| 28 | #[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] | ^^^^^^^^^^^^^^^^ the trait borsh::BorshDeserialize is not implemented for mpl_token_auth_rules::payload::Payload | = help: the following other types implement trait borsh::BorshDeserialize: () (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) (T0, T1, T2, T3, T4, T5, T6, T7) and 161 others note: required for AuthorizationData to implement borsh::BorshDeserialize --> src/processor/mod.rs:58:26 | 58 | #[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] | ^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced in this derive macro 59 | pub struct AuthorizationData { | ^^^^^^^^^^^^^^^^^ = note: 1 redundant requirement hidden = note: required for Option<AuthorizationData> to implement borsh::BorshDeserialize = help: see issue #48214 = help: add #![feature(trivial_bounds)] to the crate attributes to enable = note: this error originates in the derive macro BorshDeserialize (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0277]: the trait bound mpl_token_auth_rules::payload::Payload: borsh::BorshSerialize is not satisfied --> src/processor/mod.rs:58:10 | 58 | #[derive(BorshSerialize, BorshDeserialize, PartialEq, Eq, Debug, Clone)] | ^^^^^^^^^^^^^^ the trait borsh::BorshSerialize is not implemented for mpl_token_auth_rules::payload::Payload |

2 Answers 2

1

Try running:

cargo update -p [email protected] --precise 0.9.3
1
  • I'm getting below error error: failed to select a version for the requirement borsh = "^0.10.3" candidate versions found which didn't match: 0.9.3 location searched: crates.io index required by package solana-program v1.16.7 ... which satisfies dependency solana-program = ">=1.14, <1.17" (locked to 1.16.7) of package anchor-lang v0.28.0 ... which satisfies dependency anchor-lang = "^0.28.0" (locked to 0.28.0) of package eco-market v0.1.0 (/home/sn/Documents/projects/eco-market/programs/eco-market) perhaps a crate was updated and forgotten to be re-vendored?
    – Satya
    Commented Aug 12, 2023 at 6:54
1

You're seeing this error because of a breaking change in the Solana SDK in version 1.16. The older versions of mpl-token-metadata don't support 1.16 yet, so mixing them will cause build errors.

In the meantime, if you want to use borsh 0.10 and Solana 1.16, you can upgrade to mpl-token-metadata version 2.0, which is on beta and supports 1.16: https://crates.io/crates/mpl-token-metadata/2.0.0-beta.1

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.