Mint All Tokens to Self - Tutorial
Overview
Step 1: Create Mint Approval
// Step 1: Set up your mint approval
const mintApproval = {
fromListId: 'Mint', // From the mint address
toListId: 'All', // To any address
initiatedByListId: myAddress, // Only you can initiate
transferTimes: UintRangeArray.FullRanges(),
tokenIds: UintRangeArray.FullRanges(), // All token IDs
ownershipTimes: UintRangeArray.FullRanges(),
approvalId: 'mint-approval',
version: 0n,
approvalCriteria: {
// No restrictions - you can mint unlimited amounts
...defaultNoRestrictionsApprovalCriteria,
overridesFromOutgoingApprovals: true, // Required for mint address
},
};
// Step 1: Create your collection with the mint approval
const collection = {
...BaseCollectionDetails,
collectionApprovals: [mintApproval, ...otherApprovals],
};
// Create the collectionStep 2: Execute Mint Transfer
Last updated