Is it possible to do-or-make cNFTs i.e. multiple NFTs regarding the above SINGLE QR Solana Pay code ?
transfer createMintCNFTInstruction function.
async function createMintCNFTInstruction(merkleTree: PublicKey, user: PublicKey, authority: PublicKey, collectionMint: PublicKey) {
const [treeAuthority, _bump] = PublicKey.findProgramAddressSync(
[merkleTree.toBuffer()],
BUBBLEGUM_PROGRAM_ID,
);
const [collectionMetadataAccount, _b1] = PublicKey.findProgramAddressSync(
[
Buffer.from("metadata", "utf8"),
TOKEN_METADATA_PROGRAM_ID.toBuffer(),
collectionMint.toBuffer(),
],
TOKEN_METADATA_PROGRAM_ID
);
const [collectionEditionAccount, _b2] = PublicKey.findProgramAddressSync(
[
Buffer.from("metadata", "utf8"),
TOKEN_METADATA_PROGRAM_ID.toBuffer(),
collectionMint.toBuffer(),
Buffer.from("edition", "utf8"),
],
TOKEN_METADATA_PROGRAM_ID
);
const [bgumSigner, __] = PublicKey.findProgramAddressSync(
[Buffer.from("collection_cpi", "utf8")],
BUBBLEGUM_PROGRAM_ID
);
const tix = await createMintToCollectionV1Instruction({
treeAuthority: treeAuthority,
leafOwner: user,
leafDelegate: user,
merkleTree: merkleTree,
payer: user,
treeDelegate: authority,
logWrapper: SPL_NOOP_PROGRAM_ID,
compressionProgram: SPL_ACCOUNT_COMPRESSION_PROGRAM_ID,
collectionAuthority: authority,
collectionAuthorityRecordPda: BUBBLEGUM_PROGRAM_ID,
collectionMint: collectionMint,
collectionMetadata: collectionMetadataAccount,
editionAccount: collectionEditionAccount,
bubblegumSigner: bgumSigner,
tokenMetadataProgram: TOKEN_METADATA_PROGRAM_ID,
}, {
metadataArgs: {
collection: { key: collectionMint, verified: false },
creators: [],
isMutable: true,
name: "NameHere",
primarySaleHappened: true,
sellerFeeBasisPoints: 0,
symbol: "CAS",
uri: "https://shdw-drive.genesysgo.net/....json",
uses: null,
tokenStandard: TokenStandard.NonFungible,
editionNonce: null,
tokenProgramVersion: TokenProgramVersion.Original
}
});
return tix;
}