Reputation: 39
I am trying to mint an NFT using candy machine, I want to split the sol payment received from candy guard. Right now I have set the creators share, How do I split the sol payment on Mint.
const createInstructions = await create(props.umi, {
candyMachine,
collectionMint: collectionMint.publicKey,
collectionUpdateAuthority,
tokenStandard: TokenStandard.NonFungible,
sellerFeeBasisPoints: 0, // No royalty to market place
itemsAvailable: nftData.maxSupply, // Increase SOL cost per items. Check the cost on Devnet before launch.
creators: [
{
address: props.umi.identity.publicKey, // creators wallet
verified: true,
percentageShare: 95,
},
{
address: "second wallet address", // second wallet
verified: true,
percentageShare: 5,
},
],
configLineSettings: some({
prefixName: prefixName,
nameLength: 32-prefixName.length,
prefixUri: prefixUri,
uriLength: 200-prefixUri.length,
isSequential: true,
}),
guards: {
mintLimit: some({ id: 1, limit: nftData.maxMintAmountPerTx }),
solPayment: some({ lamports: lamports(lamportsPrice), destination: props.umi.identity.publicKey }),
},
})
I want to split 95 percent share to the creator and other 5 percent should go to the second address defined.
While minting using mintV2
, the whole payment is transferred to a single account i.e. creators account. As I understand creators share will be applicable when there is a secondary sale on this minted NFT. So how do I split the share on minting.
const nftMint = generateSigner(props.umi)
const transaction = await transactionBuilder()
.add(setComputeUnitLimit(props.umi, { units: 800_000 }))
.add(mintV2(props.umi, {
candyMachine: candyMachine.publicKey,
candyGuard: candyGuard.publicKey,
nftMint,
collectionMint: props.mintedNft.collectionMintId,
collectionUpdateAuthority: props.mintedNft.collectionUpdateAuthorityId,
mintArgs: {
mintLimit: some({ id: 1 }),
solPayment: some({destination: candyMachine.authority }),
},
})
)
Upvotes: 0
Views: 75