-
Notifications
You must be signed in to change notification settings - Fork 452
Open
Description
I'm trying out this example with Rust 1.88 on an Intel MacBook Pro 2017. When running cargo build-sbf, the program thows a long errors. Any clue?
/// More error
error[E0599]: the method `try_to_vec` exists for enum `MetadataInstruction`, but its trait bounds were not satisfied
--> src/instruction/verification.rs:87:18
|
86 | data: MetadataInstruction::Unverify(self.args.clone())
| ___________________-
87 | | .try_to_vec()
| | -^^^^^^^^^^ method cannot be called on `MetadataInstruction` due to unsatisfied trait bounds
| |_________________|
|
|
::: src/instruction/mod.rs:50:1
|
50 | pub enum MetadataInstruction {
| ---------------------------- method `try_to_vec` not found for this enum because it doesn't satisfy `_: BorshSerialize`
|
::: src/instruction/delegate.rs:18:1
|
18 | pub enum DelegateArgs {
| --------------------- doesn't satisfy `_: BorshSerialize`
|
::: src/instruction/metadata.rs:54:1
|
54 | pub enum MintArgs {
| ----------------- doesn't satisfy `_: BorshSerialize`
...
65 | pub enum TransferArgs {
| --------------------- doesn't satisfy `_: BorshSerialize`
...
81 | pub enum UpdateArgs {
| ------------------- doesn't satisfy `_: BorshSerialize`
|
::: src/instruction/state.rs:12:1
|
12 | pub enum LockArgs {
| ----------------- doesn't satisfy `_: BorshSerialize`
...
22 | pub enum UnlockArgs {
| ------------------- doesn't satisfy `_: BorshSerialize`
|
::: src/instruction/uses.rs:29:1
|
29 | pub enum UseArgs {
| ---------------- doesn't satisfy `instruction::uses::UseArgs: borsh::BorshSerialize`
|
= note: the following trait bounds were not satisfied:
`instruction::delegate::DelegateArgs: borsh::BorshSerialize`
`instruction::metadata::MintArgs: borsh::BorshSerialize`
`instruction::metadata::TransferArgs: borsh::BorshSerialize`
`instruction::metadata::UpdateArgs: borsh::BorshSerialize`
`instruction::state::LockArgs: borsh::BorshSerialize`
`instruction::state::UnlockArgs: borsh::BorshSerialize`
`instruction::uses::UseArgs: borsh::BorshSerialize`
note: the trait `borsh::BorshSerialize` must be implemented
--> src/ser/mod.rs:43:1
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `try_to_vec`, perhaps you need to implement one of them:
candidate #1: `borsh::BorshSerialize`
candidate #2: `borsh::ser::BorshSerialize`
error[E0599]: the variant or associated item `try_from_slice` exists for enum `MetadataInstruction`, but its trait bounds were not satisfied
--> src/processor/mod.rs:90:50
|
90 | let instruction = match MetadataInstruction::try_from_slice(input) {
| ^^^^^^^^^^^^^^ variant or associated item cannot be called on `MetadataInstruction` due to unsatisfied trait bounds
|
::: src/instruction/mod.rs:50:1
|
50 | pub enum MetadataInstruction {
| ---------------------------- variant or associated item `try_from_slice` not found for this enum because it doesn't satisfy `_: BorshDeserialize`
|
::: src/instruction/delegate.rs:18:1
|
18 | pub enum DelegateArgs {
| --------------------- doesn't satisfy `_: BorshDeserialize`
|
::: src/instruction/metadata.rs:54:1
|
54 | pub enum MintArgs {
| ----------------- doesn't satisfy `_: BorshDeserialize`
...
65 | pub enum TransferArgs {
| --------------------- doesn't satisfy `_: BorshDeserialize`
...
81 | pub enum UpdateArgs {
| ------------------- doesn't satisfy `_: BorshDeserialize`
|
::: src/instruction/state.rs:12:1
|
12 | pub enum LockArgs {
| ----------------- doesn't satisfy `_: BorshDeserialize`
...
22 | pub enum UnlockArgs {
| ------------------- doesn't satisfy `_: BorshDeserialize`
|
::: src/instruction/uses.rs:29:1
|
29 | pub enum UseArgs {
| ---------------- doesn't satisfy `_: BorshDeserialize`
|
= note: the following trait bounds were not satisfied:
`instruction::delegate::DelegateArgs: borsh::BorshDeserialize`
`instruction::metadata::MintArgs: borsh::BorshDeserialize`
`instruction::metadata::TransferArgs: borsh::BorshDeserialize`
`instruction::metadata::UpdateArgs: borsh::BorshDeserialize`
`instruction::state::LockArgs: borsh::BorshDeserialize`
`instruction::state::UnlockArgs: borsh::BorshDeserialize`
`instruction::uses::UseArgs: borsh::BorshDeserialize`
note: the trait `borsh::BorshDeserialize` must be implemented
--> src/de/mod.rs:30:1
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `try_from_slice`, perhaps you need to implement one of them:
candidate #1: `borsh::BorshDeserialize`
candidate #2: `borsh::de::BorshDeserialize`
candidate #3: `borsh::de::BorshDeserialize`
error[E0277]: the trait bound `T: borsh::de::BorshDeserialize` is not satisfied
--> src/utils/mod.rs:176:21
|
176 | let result: T = try_from_slice_unchecked(data)?;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `borsh::de::BorshDeserialize` is not implemented for `T`
|
note: required by a bound in `solana_program::borsh::try_from_slice_unchecked`
--> src/borsh.rs:39:1
help: consider further restricting this bound
|
167 | pub fn try_from_slice_checked<T: TokenMetadataAccount + borsh::de::BorshDeserialize>(
| +++++++++++++++++++++++++++++
Some errors have detailed explanations: E0277, E0599.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `mpl-token-metadata` (lib) due to 63 previous errors
Metadata
Metadata
Assignees
Labels
No labels