Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add anchor-spl/idl-build in idl-build feature list in documentation #3537

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hthuz
Copy link

@hthuz hthuz commented Feb 5, 2025

I'm trying to follow the doc to create a token mint locally. However, I met the following compilation error:

error[E0277]: the trait bound `anchor_spl::token_interface::Mint: Discriminator` is not satisfied
  --> programs/sol-example/src/lib.rs:29:39
   |
29 |     pub mint: InterfaceAccount<'info, Mint>,
   |                                       ^^^^ the trait `Discriminator` is not implemented for `anchor_spl::token_interface::Mint`

from the struct

#[derive(Accounts)]
pub struct CreateMint<'info> {
    #[account(mut)]
    pub signer: Signer<'info>,
    #[account(
        init,
        payer = signer,
        mint::decimals = 6,
        mint::authority = signer.key(),
        mint::freeze_authority = signer.key(),
    )]

    pub mint: InterfaceAccount<'info, Mint>,
    pub token_program: Interface<'info, TokenInterface>,
    pub system_program: Program<'info, System>,
}

I tracked #3151 and #2745 and found that the documentation doesn't mention the anchor-spl/idl-build feature, which causes the compilation error. This PR adds this requirement to the documentation.

Copy link

vercel bot commented Feb 5, 2025

@hthuz is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant