metaplex-foundation / mpl-core

https://mpl-core-js-docs.vercel.app
Other
36 stars 24 forks source link

BurnCollection always fails with Invalid Authority #37

Open joefitter opened 5 months ago

joefitter commented 5 months ago

BurnCollectonV1 always fails with invalid authority, when called with CPI, or just using the ts SDK.

Barebones repro:

    const umi = getUmi(authority)
    const collection = generateSigner(umi)

    await createCollectionV1(umi, {
      collection,
      name: "Test Core Collection",
      uri: "",
    }).sendAndConfirm(umi)

    // this throws with Invalid Authority
    await burnCollectionV1(umi, { collection: collection.publicKey, compressionProof: null }).sendAndConfirm(umi)
    const exists = await umi.rpc.accountExists(collection.publicKey)
    console.log({ exists })

 Program Logs:
| Program CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d invoke [1]
| Program log: Instruction: BurnCollection
| Program log: checks: {}
| Program log: approved: false rejected false
| Program log: approved: false rejected false
| Program log: Invalid Authority
| Program CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d consumed 6042 of 200000 compute units
| Program CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d failed: custom program error: 0x9
joefitter commented 5 months ago

Fixed in https://github.com/metaplex-foundation/mpl-core/pull/51