I am using below code to mint pNFT on Solana using Metaplex
const transactionBuilder = await METAPLEX
.nfts()
.builders()
.create({
uri: metadataUri,
name: name,
sellerFeeBasisPoints: sellerFee,
symbol: symbol,
creators: creators,
isMutable: true,
isCollection: false,
tokenStandard: TokenStandard.ProgrammableNonFungible,
ruleSet: null
});
let { signature, confirmResponse } = await METAPLEX.rpc().sendAndConfirmTransaction(transactionBuilder, { commitment: 'finalized' });
I have error in second line METAPLEX.rpc().sendAndConfirmTransaction().
Below is my error log
ParsedProgramError: The program [TokenMetadataProgram] at address [metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s] raised an error of code [1] that translates to "".
How to fix it?
The SDK I was using has been deprecated. So I switched to new JS SDK. Below is the code I used for this.
This is working fine.
You can check the documentatio here.