插件

Permanent Freeze Delegate

Last updated January 31, 2026

Permanent Freeze Delegate Plugin提供在转移后仍然有效的不可撤销freeze权限。用于灵魂绑定代币、Collection范围冻结和永久锁定机制。

学习内容

  • 创建具有永久freeze功能的Asset
  • 一次性冻结整个Collection
  • 实现灵魂绑定(不可转让)代币
  • 理解permanent vs 普通freeze delegate

概述

Permanent Freeze Delegate是一个只能在创建时添加的permanent plugin。与普通Freeze Delegate不同,此权限永久有效,即使在转移后也可以冻结/解冻。

  • 只能在Asset/Collection创建时添加
  • 权限在转移后保留(永不撤销)
  • 使用forceApprove - 即使有其他阻止plugin也可以冻结
  • Collection级别冻结影响Collection中的所有Asset

范围外

普通freeze delegate(参见Freeze Delegate)、临时冻结和Token Metadata freeze权限。

快速开始

跳转到: 创建Asset · 创建Collection · 更新(解冻)

  1. 在Asset/Collection创建时添加PermanentFreezeDelegate plugin
  2. 立即冻结设置frozen: true,稍后冻结设置false
  3. delegate可以在任何时候冻结/解冻,即使在转移后

Permanent vs 普通Freeze Delegate

功能Freeze DelegatePermanent Freeze Delegate
创建后添加✅ 可以❌ 仅限创建时
转移后权限保留❌ 撤销✅ 保留
适用于Collection❌ 不可以✅ 可以
forceApprove❌ 没有✅ 有
灵魂绑定代币❌ 有限✅ 最佳选择
选择Freeze Delegate:用于临时、可撤销的冻结。
选择Permanent Freeze Delegate:用于永久权限或Collection范围冻结。

常见用例

  • 灵魂绑定代币:创建不可转让的凭证、成就或会员资格
  • Collection范围冻结:使用一个plugin冻结Collection中的所有Asset
  • 永久抵押品:作为即使所有权变更后仍然存在的抵押品锁定Asset
  • 游戏物品永久性:无论交易如何都保持锁定的物品
  • 合规要求:因监管原因必须保持冻结的Asset

兼容性

MPL Core Asset
MPL Core Collection

行为

  • Asset:允许delegated地址随时冻结和解冻NFT。
  • Collection:允许collection authority一次性冻结和解冻整个Collection。使用此delegate无法冻结Collection中的单个asset。

参数

参数
frozenbool

创建带有Permanent Freeze plugin的Asset

以下示例展示如何创建带有Permanent Freeze plugin的Asset。

创建带有Permanent Freeze plugin的Asset

import { publicKey } from '@metaplex-foundation/umi'
import { create } from '@metaplex-foundation/mpl-core'
const assetSigner = generateSigner(umi)
const delegate = publicKey('33333333333333333333333333333')
await create(umi, {
asset: assetSigner,
name: 'My NFT',
uri: 'https://example.com/my-asset.json',
plugins: [
{
type: 'PermanentFreezeDelegate',
frozen: true,
authority: { type: 'Address', address: delegate },
},
],
}).sendAndConfirm(umi)

更新Asset上的Permanent Freeze Delegate plugin

以下示例展示如何更新Asset上的Permanent Freeze Delegate plugin。将frozen参数设置为truefalse以冻结或解冻。假设签名钱包是plugin authority。

更新Asset上的Permanent Freeze Delegate plugin

import { updatePlugin } from '@metaplex-foundation/mpl-core'
const updateAssetResponse = await updatePlugin(umi, {
asset: asset.publicKey,
plugin: {
type: "PermanentFreezeDelegate",
frozen: false,
},
}).sendAndConfirm(umi);

创建带有Permanent Freeze plugin的Collection

以下示例展示如何创建带有Permanent Freeze plugin的Collection。

创建带有Permanent Freeze plugin的Collection

import { generateSigner } from '@metaplex-foundation/umi'
import { createCollection } from '@metaplex-foundation/mpl-core'
const collectionSigner = generateSigner(umi)
await createCollection(umi, {
collection: collectionSigner,
name: "Frozen Collection",
uri: "https://example.com/my-collection.json",
plugins: [
{
type: 'PermanentFreezeDelegate',
frozen: true,
authority: { type: "UpdateAuthority"}, // The update authority can unfreeze it
},
],
}).sendAndConfirm(umi);

更新带有Permanent Freeze plugin的Collection

以下示例展示如何更新Collection上的Permanent Freeze Delegate plugin。将frozen参数设置为truefalse以冻结或解冻。假设签名钱包是plugin authority。

更新带有Permanent Freeze plugin的Collection

import { updateCollectionPlugin } from '@metaplex-foundation/mpl-core'
const updateCollectionResponse = await updateCollectionPlugin(umi, {
collection: collectionSigner.publicKey,
plugin: {
type: "PermanentFreezeDelegate",
frozen: false,
},
}).sendAndConfirm(umi);

常见错误

Cannot add permanent plugin after creation

Permanent plugin只能在Asset/Collection创建时添加。您无法将Permanent Freeze Delegate添加到现有Asset。

Authority mismatch

只有plugin authority可以冻结/解冻。请验证您是否使用正确的密钥对签名。

注意事项

  • 仅限创建时:Asset/Collection存在后无法添加
  • Force approve:即使有冲突的plugin也可以冻结
  • Collection行为:一次性冻结所有Asset,不是单独冻结
  • 永久有效:权限即使在转移后也永不撤销
  • 使用frozen: true和authority None来创建灵魂绑定代币

FAQ

如何创建灵魂绑定(不可转让)代币?

使用PermanentFreezeDelegate创建Asset,将frozen设置为true,将authority设置为None。该Asset将永远无法解冻或转移。

Freeze Delegate和Permanent Freeze Delegate有什么区别?

普通Freeze Delegate authority在转移时会被撤销,只适用于Asset。Permanent Freeze Delegate永久有效,适用于Collection,并使用forceApprove

我可以冻结Collection中的单个Asset吗?

不可以。当Permanent Freeze Delegate在Collection上时,冻结会一次性影响所有Asset。使用Asset级别的Permanent Freeze Delegate进行单独控制。

永久冻结的Asset可以被burn吗?

只有在同时存在Permanent Burn Delegate的情况下才可以。普通Burn Delegate无法burn冻结的Asset,但Permanent Burn Delegate使用forceApprove

相关Plugin

术语表

术语定义
Permanent Plugin只能在创建时添加且永久有效的Plugin
forceApprove覆盖其他plugin拒绝的验证
Soulbound永久冻结到钱包的不可转让代币
Collection Freeze一次性冻结Collection中的所有Asset