Skip to content

Add master edition account deserialization to spl metadata#2393

Merged
Henry-E merged 1 commit into
otter-sec:masterfrom
holaplex:espi/master-edition-acount-spl
Feb 27, 2023
Merged

Add master edition account deserialization to spl metadata#2393
Henry-E merged 1 commit into
otter-sec:masterfrom
holaplex:espi/master-edition-acount-spl

Conversation

@kespinola

@kespinola kespinola commented Feb 8, 2023

Copy link
Copy Markdown
Contributor

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

vercel Bot commented Feb 8, 2023

Copy link
Copy Markdown

@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

Henry-E commented Feb 27, 2023

Copy link
Copy Markdown

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 otter-sec:master Feb 27, 2023
@kespinola

Copy link
Copy Markdown
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

Henry-E commented Mar 1, 2023

Copy link
Copy Markdown

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

Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
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