You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
New installations of Anchor 0.28.0 fails showing multiple Borsh errors while using following dependencies:
[dependencies]
anchor-lang = { version = "0.28.0", features = ["init-if-needed"] }
anchor-spl = { version = "0.28.0", features = ["metadata"] }
solana-program = "1.14.19"
mpl-token-metadata = { version = "1.12.0", features = ["no-entrypoint"] }
Errors displayed:
error[E0277]: the trait bound `Pubkey: BorshSerialize` is not satisfied
--> src/system_program.rs:374:10
|
374 | #[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)
New installations of Anchor 0.28.0 fails showing multiple Borsh errors while using following dependencies:
Errors displayed:
Issue is explained in more detail here.
I think that the error comes from this line forcing the Borsh version
0.10.3
instead of0.9.3
.Suggestion
Replace that line byborsh = "=0.9.3"
and bump a new "working" Anchor version 0.28.1?The text was updated successfully, but these errors were encountered: