기능
Core Collection 업데이트
Last updated April 8, 2026
updateCollection과 updateCollectionPlugin은 기존 Core Collection의 메타데이터와 플러그인 구성을 수정합니다.
학습 내용
- Collection의 이름 또는 URI 업데이트
- Collection에 부착된 플러그인 업데이트
Summary
Core Collection의 생성 후 업데이트를 위한 두 가지 명령어가 있습니다.
updateCollection— 컬렉션의name또는uri변경updateCollectionPlugin— 컬렉션의 기존 플러그인 구성 수정- 두 명령어 모두
updateAuthority의 서명이 필요합니다 - 컬렉션 레벨 플러그인의 변경사항은 이를 상속하는 멤버 Asset에 전파됩니다
이동: 메타데이터 업데이트 · 플러그인 업데이트 · 오류 처리
전제 조건
- Collection의
updateAuthority를 서명자로 설정한 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 플러그인의 베이시스 포인트와 크리에이터 배분을 업데이트합니다.
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
컬렉션의 updateAuthority로 서명하고 있지 않습니다. 컬렉션을 조회하여 확인하세요:
const collection = await fetchCollection(umi, collectionAddress)
console.log(collection.updateAuthority) // umi.identity와 일치해야 함
Notes
- 컬렉션에 아직 존재하지 않는 플러그인을 추가하려면
updateCollectionPlugin대신addCollectionPlugin을 사용하세요 - 컬렉션 레벨 플러그인을 업데이트하면 이를 상속하는 모든 Asset에 영향을 미칩니다 — 동일한 타입의 자체 플러그인을 가진 Asset은 영향을 받지 않습니다
updateCollection의newUpdateAuthority파라미터로updateAuthority를 새 계정으로 이전할 수 있습니다
Quick Reference
| Instruction | JS 함수 | 사용 시점 |
|---|---|---|
UpdateCollectionV1 | updateCollection | name 또는 uri 변경 |
UpdateCollectionPluginV1 | updateCollectionPlugin | 기존 플러그인 구성 수정 |
| 계정 | 필수 | 설명 |
|---|---|---|
collection | Yes | 업데이트할 Collection |
authority | Yes | updateAuthority여야 함 |
payer | Yes | 트랜잭션 수수료 지불 |
newUpdateAuthority | No | 새 계정으로 Update Authority 이전 |
