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

Add master edition account deserialization to spl metadata #2393

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

kespinola
Copy link
Contributor

@kespinola kespinola commented Feb 8, 2023

Changes

  • Include MasterEditionAccount to spl metadata to deserialize master edition v2 accounts
pub struct CreateDrop<'info> {
    /// authority over and payer for the drop
    #[account(mut)]
    pub authority: Signer<'info>,

    #[account(
        seeds = [state::PREFIX.as_bytes(), Metadata::id().as_ref(), metadata_mint.key().as_ref(), state::EDITION.as_bytes()],
        seeds::program = Metadata::id(),
        bump,
    )]

    #[account(constraint = master_edition.supply > 0)]
    pub master_edition: Account<'info, MasterEditionAccount>,
    
    ...
}

@vercel
Copy link

vercel bot commented Feb 8, 2023

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

A member of the Team first needs to authorize it.

@kespinola kespinola force-pushed the espi/master-edition-acount-spl branch from a81e8fd to 5016784 Compare February 8, 2023 14:24
@Henry-E
Copy link

Henry-E commented Feb 27, 2023

Usually it's nice see an example or two implementing the new type but this looks ok and people will surely complain soon if it breaks. Thanks for the PR!

@Henry-E Henry-E merged commit 6f4f32a into coral-xyz:master Feb 27, 2023
@kespinola
Copy link
Contributor Author

@Henry-E updated PR description with usage example.

@kespinola kespinola deleted the espi/master-edition-acount-spl branch March 1, 2023 08:50
@Henry-E
Copy link

Henry-E commented Mar 1, 2023

I meant more like an example we run inside the tests/ directory. It's kind of something that we're missing in general that we don't have a bunch of CPI examples in tests/spl. Someday

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.

2 participants