Plugins

Freeze Delegate

Overview

The Freeze Plugin is a Owner Managed plugin that freezes the Asset disallowing transfer. The authority of the plugin can revoke themselves or unfreeze at any time.

The Freeze Plugin will work in areas such as:

  • Escrowless staking.
  • Escrowless listing of an NFT on a marketplace.

Works With

MPL Core Asset
MPL Core Collection

Arguments

ArgValue
frozenbool

Adding the Freeze Delegate Plugin to an Asset

Adding a Freeze Plugin to an MPL Core Asset

import { publicKey } from '@metaplex-foundation/umi'
import { addPluginV1, createPlugin } from '@metaplex-foundation/mpl-core'

const asset = publicKey('11111111111111111111111111111111')

await addPluginV1(umi, {
  asset: asset,
  plugin: createPlugin({ type: 'FreezeDelegate', data: { frozen: true } }),
}).sendAndConfirm(umi)

Delegate the Freeze Authority

The Authority to freeze and thaw an Asset can be delegated to a different Address than the owner.

Thaw an MPL Core Asset

import { publicKey } from '@metaplex-foundation/umi'
import { updatePluginV1, createPlugin } from '@metaplex-foundation/mpl-core'

const asset = publicKey('11111111111111111111111111111111')

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

Thawing a Frozen Asset

When an Asset is frozen it can be thawed again by the plugin authority.

Thaw an MPL Core Asset

import { publicKey } from '@metaplex-foundation/umi'
import { updatePluginV1, createPlugin } from '@metaplex-foundation/mpl-core'

const asset = publicKey('11111111111111111111111111111111')

await updatePluginV1(umi, {
  asset: asset,
  plugin: createPlugin({ type: 'FreezeDelegate', data: { frozen: false } }),
  authority: delegateAuthority
}).sendAndConfirm(umi);
Previous
Transfer Delegate Plugin