donny-caldes
donny-caldes

Reputation: 3

CPI calls to metaplex programs (metadata, token-vault, auction, etc.)

I have a use case where i'd like to update NFT's metadata from a program. How should i construct such instruction?

On a side note, could i use a PDA (owned by custom program) as update authority?

Upvotes: 0

Views: 536

Answers (1)

dr497
dr497

Reputation: 554

Yes, it's possible to edit the token metadata via CPI. It's also possible to use a PDA as the update authority, you just need to use the correct seeds when invoking the update instructions.

The update_metadata_accounts_v2 Rust binding can be found here

Here is an example of a PDA updating metadata https://github.com/Bonfida/name-tokenizer/blob/master/program/src/processor/create_nft.rs#L317=

Upvotes: 1

Related Questions