Hey everyone, I’m having a hard time changing the metadata for a Metaplex NFT. I’m using @metaplex/js and my code seems to run without any errors. The transaction goes through fine on Solana Explorer, but the metadata stays unchanged. Here’s a simplified version of what I’m trying:
import { MetaplexSDK } from '@metaplex/sdk';
async function changeNFTData() {
const sdk = new MetaplexSDK();
const nft = await sdk.nfts().findByMint('ABCD123...'); // Example mint address
const updatedNFT = await sdk.nfts().update({
nftOrSft: nft,
name: 'New Name',
symbol: 'NEW',
uri: '',
});
console.log('Updated NFT:', updatedNFT);
}
changeNFTData();
Can anyone spot what I might be doing wrong? Or is there something else I need to check? Thanks for any help!
hey, i’ve run into this before. make sure ur using the right wallet with update authority. also, try passing the existing URI instead of an empty string - that can mess things up sometimes. double check ur using the latest metaplex SDK version too. good luck!
hey there MayaPixel55! i’ve dabbled with metaplex stuff too and it can be tricky sometimes. have you tried checking if the changes are actually visible on-chain but just not showing up in explorers or marketplaces? sometimes there’s a delay in those updating.
also, curious - are you running this on mainnet or devnet? i’ve noticed devnet can be a bit finicky with metadata updates occasionally.
oh, and random thought - have you considered using the new @metaplex-foundation/js SDK instead? i switched to that recently and found it a bit more intuitive for metadata updates.
let us know how it goes! always cool to see what others are working on in the nft space
I encountered a similar issue when updating Metaplex NFT metadata. One key thing to check is whether you have the necessary authority to modify the NFT. Make sure you’re using the correct wallet that has update authority for the NFT you’re trying to modify.
Another potential issue could be with the URI field. If you’re not changing the URI, try passing the existing URI instead of an empty string. Sometimes, leaving it blank can cause unexpected behavior.
Lastly, consider using the latest version of the Metaplex SDK, as there have been updates that address some metadata modification issues. If the problem persists, you might want to try using the lower-level @metaplex-foundation/mpl-token-metadata library for more direct control over the update process.
Remember to always test on devnet first before making changes to mainnet NFTs.