Skip to content

fix(spl): pass collection account key in unverify_collection CPI - #4958

Open
spellsaif wants to merge 1 commit into
otter-sec:masterfrom
spellsaif:fix/spl-metadata-unverify-collection
Open

fix(spl): pass collection account key in unverify_collection CPI#4958
spellsaif wants to merge 1 commit into
otter-sec:masterfrom
spellsaif:fix/spl-metadata-unverify-collection

Conversation

@spellsaif

Copy link
Copy Markdown

In anchor-spl/src/metadata.rs, unverify_collection and unverify_sized_collection_item incorrectly passed ctx. accounts.metadata.key as the collection field in mpl_token_metadata::instructions::UnverifyCollection and UnverifySizedCollectionItem.

This ignored ctx.accounts.collection and caused the Metaplex CPI to fail on-chain because the item's own metadata account was being passed as the collection metadata account.

Changes

  • In unverify_collection, pass *ctx.accounts.collection.key to mpl_token_metadata::instructions::UnverifyCollection.collection.
  • In unverify_sized_collection_item, pass *ctx.accounts.collection.key to mpl_token_metadata::instructions::UnverifySizedCollectionItem.collection.

Impact

  • Fixes Metaplex unverify collection CPIs when using anchor-spl.
  • Non-breaking change; aligns with the accounts struct UnverifyCollection definition.

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

@spellsaif is attempting to deploy a commit to the OtterSec 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.

3 participants