2

I am using mpl core and I am trying to remove the freeze delegate plugin, but getting this error

  logs: [
    'Program 5TXoYuQbVzpFAqp2HdRtsAnH42pnps156V4WH8cHWGPz invoke [1]',
    'Program log: Instruction: CancelRentCore',
    'Program log: calling unlock core',
    'Program log: asset manager authority GRa8XGiSERUKN5jMRKMiMG9Xu3uCxgBN3EGGNzW4dyuC',
    'Program CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d invoke [2]',
    'Program log: Instruction: RemovePlugin',
    'Program log: FreezeDelegate: Rejected',
    'Program log: Invalid Authority',
    'Program CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d consumed 10529 of 280011 compute units',
    'Program CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d failed: custom program error: 0x9',
    'Program 5TXoYuQbVzpFAqp2HdRtsAnH42pnps156V4WH8cHWGPz consumed 30518 of 300000 compute units',
    'Program 5TXoYuQbVzpFAqp2HdRtsAnH42pnps156V4WH8cHWGPz failed: custom program error: 0x9'
  ]
}

I think the error might be because the asset is frozen, and if so how do I unfreeze the asset?

Here is the Rust program code

  RemovePluginV1CpiBuilder::new(&self.core_program.clone().unwrap().as_ref())
            .asset(&self.asset_account)
            .payer(from)
            .authority(Some(&to))
            .plugin_type(PluginType::FreezeDelegate)
            .system_program(&self.system_program)
            .invoke_signed(asset_manager_signer)?;

1 Answer 1

4

Depending on what you are trying to achieve you would either thaw the Asset, or remove the plugin altogether.

Those are examples using the umi JS SDK @metaplex-foundation/mpl-core.

To remove a plugin completely you would have to use:

  const result = removePluginV1(umi, {
    asset: asset.publicKey,
    pluginType: PluginType.FreezeDelegate,
  }).sendAndConfirm(umi);

To just thaw the asset you would update the plugin using data frozen: false.

  await updatePluginV1(umi, {
    asset: asset.publicKey,
    plugin: createPlugin({ type: 'FreezeDelegate', data: { frozen: false } }),
  }).sendAndConfirm(umi);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.