0

use anchor_lang::prelude::; use { anchor_lang::{ prelude::, solana_program::program::invoke, system_program, }, anchor_spl::{ associated_token, token, }, mpl_token_metadata::{ ID as TOKEN_METADATA_ID, instruction as token_instruction, }, };

error

error[E0432]: unresolved import mpl_token_metadata::instruction --> programs/nft-marketplace/src/lib.rs:14:9 | 14 | instruction as token_instruction, | -----------^^^^^^^^^^^^^^^^^^^^^ | | | no instruction in the root | help: a similar name exists in the module: instructions | = help: consider importing one of these items instead: solana_program::address_lookup_table::instruction solana_program::instruction solana_program::stake::instruction solana_program::vote::instruction

1
  • Do you have the Metaplex crate installed?
    – Jimii
    Commented May 16 at 14:45

1 Answer 1

0

Try renaming it to mpl_token_intruction.

Use mpl_token_metadata::instruction as mpl_token_instruction;

Ref https://docs.rs/mpl-token-metadata/latest/mpl_token_metadata/

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.