Theme

Plugins

Update Delegate Plugin

The Update Delegate is a Authority Managed plugin that allows the authority of the MPL Core Asset to assign an Update Delegate to the Asset.

The Update Delegate Plugin can be used when:

  • you need a 3rd party to update/edit the entire MPL Core Asset.

Works With

MPL Core Asset
MPL Core Collection

Arguments

additionalDelegatespublickey[]

additionalDelegates

Additional delegates allow you to add more than one delegate to the updateDelegate plugin.

Additional delegates can do everything that the update authority can do except:

  • add or change the additional delegates array (apart from remove themselves).
  • change the plugin authority of the updateAuthority plugin.
  • change the root update authority of the collection.

Adding the Update Delegate Plugin to an Asset

Adding a Update Delegate Plugin to an MPL Core Asset

import { publicKey } from '@metaplex-foundation/umi'
import { addPlugin } from '@metaplex-foundation/mpl-core'

const assetAddress = publicKey('11111111111111111111111111111111')
const delegate = publicKey('22222222222222222222222222222222')

await addPlugin(umi, {
  asset: assetAddress,
  plugin: {
    type: 'UpdateDelegate',
    authority: { type: 'Address', address: delegate },
    additionalDelegates: [],
  },
}).sendAndConfirm(umi)

Updating the Update Delegate Plugin

The Update Delegate Plugin can be updated to modify the list of additional delegates or change the plugin authority.

Updating Update Delegate Plugin on Asset

import { publicKey } from '@metaplex-foundation/umi'
import { updatePlugin } from '@metaplex-foundation/mpl-core'

const assetAddress = publicKey('11111111111111111111111111111111')
const newDelegate = publicKey('33333333333333333333333333333333')
const existingDelegate = publicKey('22222222222222222222222222222222')

await updatePlugin(umi, {
  asset: assetAddress,
  plugin: {
    type: 'UpdateDelegate',
    additionalDelegates: [existingDelegate, newDelegate], // Add or remove delegates
  },
}).sendAndConfirm(umi)

Updating Update Delegate Plugin on Collection

Updating Update Delegate Plugin on Collection

import { publicKey } from '@metaplex-foundation/umi'
import { updateCollectionPlugin } from '@metaplex-foundation/mpl-core'

const collectionAddress = publicKey('11111111111111111111111111111111')
const delegate1 = publicKey('22222222222222222222222222222222')
const delegate2 = publicKey('33333333333333333333333333333333')

await updateCollectionPlugin(umi, {
  collection: collectionAddress,
  plugin: {
    type: 'UpdateDelegate',
    additionalDelegates: [delegate1, delegate2], // Updated delegates list
  },
}).sendAndConfirm(umi)
Previous
Royalties Plugin