Theme

Plugins

Burn Delegate

The Transfer Plugin is a Owner Managed plugin that allows the authority of the program to burn the Asset at any given moment.

The Burn Plugin will work in areas such as:

  • Gaming scenario where the users NFT get burned based on an event that occurs.

Works With

MPL Core Assetβœ…
MPL Core Collection❌

Arguments

The Burn Plugin doesn't contain any arguments to pass in.

Adding the Burn Plugin to an Asset

Adding a Burn Plugin to an MPL Core Asset

import { publicKey } from '@metaplex-foundation/umi'
import { addPlugin } from '@metaplex-foundation/mpl-core'
(async () => {
const asset = publicKey('11111111111111111111111111111111')
await addPlugin(umi, {
asset: asset,
plugin: { type: 'BurnDelegate' },
}).sendAndConfirm(umi)
})();

Delegating Burn Authority

The Burn Delegate plugin authority can be delegated to a different address using the approvePluginAuthority function. This allows you to change who can burn the Asset.

Delegate Burn Authority

import { publicKey } from '@metaplex-foundation/umi'
import { approvePluginAuthority } from '@metaplex-foundation/mpl-core'
(async () => {
const assetAddress = publicKey('11111111111111111111111111111111')
const newDelegate = publicKey('22222222222222222222222222222222')
await approvePluginAuthority(umi, {
asset: assetAddress,
plugin: { type: 'BurnDelegate' },
newAuthority: { type: 'Address', address: newDelegate },
}).sendAndConfirm(umi)
})();

Revoking Burn Authority

The burn authority can be revoked using the revokePluginAuthority function, returning control to the asset owner.

Revoke Burn Authority

import { publicKey } from '@metaplex-foundation/umi'
import { revokePluginAuthority } from '@metaplex-foundation/mpl-core'
(async () => {
const assetAddress = publicKey('11111111111111111111111111111111')
await revokePluginAuthority(umi, {
asset: assetAddress,
plugin: { type: 'BurnDelegate' },
}).sendAndConfirm(umi)
})();
Previous
Freeze Execute Plugin