機能

Core Collectionの更新

Last updated April 8, 2026

updateCollectionupdateCollectionPluginは既存のCore Collectionのメタデータとプラグイン設定を変更します。

学習内容

  • CollectionのnameまたはURIの更新
  • Collectionに付与されたプラグインの更新

Summary

Core Collectionの作成後の更新には2つの命令があります。

  • updateCollection — collectionのnameまたはuriを変更する
  • updateCollectionPlugin — collectionの既存プラグインの設定を変更する
  • どちらもupdateAuthorityの署名が必要です
  • コレクションレベルのプラグインへの変更はそれを継承するメンバーAssetに伝播します

ジャンプ: メタデータの更新 · プラグインの更新 · エラー対処

前提条件

  • CollectionのupdateAuthorityをsignerとして設定したUmi — この値を取得するにはCollectionの取得を参照
  • 更新したいcollectionのアドレス

Collectionメタデータ更新

updateCollectionは既存Collectionのnameおよび/またはuriを変更します。変更したいフィールドのみ渡してください。

Core Collectionの更新

update-collection.ts
import { publicKey } from '@metaplex-foundation/umi'
import { updateCollection } from '@metaplex-foundation/mpl-core'
const collectionAddress = publicKey('1111111111111111111111111111111')
await updateCollection(umi, {
collection: collectionAddress,
name: 'My Updated Collection',
uri: 'https://example.com/new-uri.json',
}).sendAndConfirm(umi)

Collectionプラグイン更新

updateCollectionPluginはCollectionにすでに付与されているプラグインの設定を変更します。以下の例ではRoyaltiesプラグインのBasis pointsとクリエイター配分を更新しています。

Core Collectionプラグインの更新

update-collection-plugin.ts
import { publicKey } from '@metaplex-foundation/umi'
import { updateCollectionPlugin, ruleSet } from '@metaplex-foundation/mpl-core'
const collectionAddress = publicKey('1111111111111111111111111111111')
const newCreator = publicKey('5555555555555555555555555555555')
await updateCollectionPlugin(umi, {
collection: collectionAddress,
plugin: {
type: 'Royalties',
basisPoints: 400,
creators: [{ address: newCreator, percentage: 100 }],
ruleSet: ruleSet('None'),
},
}).sendAndConfirm(umi)

よくあるエラー

Authority mismatch

CollectionのupdateAuthorityとして署名していません。Collectionを取得して確認してください:

const collection = await fetchCollection(umi, collectionAddress)
console.log(collection.updateAuthority) // umi.identityと一致する必要があります

Notes

  • Collectionにまだ存在しないプラグインを追加するには、updateCollectionPluginではなくaddCollectionPluginを使用してください
  • コレクションレベルのプラグインを更新すると、それを継承するすべてのAssetに影響します — 同じタイプの自前プラグインを持つAssetは影響を受けません
  • updateCollectionnewUpdateAuthorityパラメータでupdateAuthorityを新しいアカウントに移管できます

Quick Reference

InstructionJS関数使用場面
UpdateCollectionV1updateCollectionnameまたはuriの変更
UpdateCollectionPluginV1updateCollectionPlugin既存プラグインの設定変更
アカウント必須説明
collectionYes更新するCollection
authorityYesupdateAuthorityである必要がある
payerYesトランザクション手数料の支払い
newUpdateAuthorityNo新しいアカウントにUpdate Authorityを移管
ソースリンク
UpdateCollectionV1GitHub
UpdateCollectionPluginV1GitHub