Create Collection
note
This section requires completing the "Register Project" step.
After registry process,the next step is to create your NFT collections. Yey!🎉
This is the smart contract function that is in your deployed entity contract for you.
function createCollection(
CollectionParams memory collectionParams,
bool isDynamicUri,
uint8 ERCimplementation,
bytes32 merkelRoot
) external returns (address instance);
After creating your collection, according to the given parameters, like whether it is dynamic URI, free, etc., your collection's mint type will be determined automatically. So that you can mint your NFTs with the determined type using the mint function according to your collection's type.
CollectionParams Example
struct CollectionParams {
templteId: uint256;
collectionURIs: string[];
totalSupply: uint256;
mintPrice: uint256;
mintPerAccountLimit: uint8;
name: string;
symbol: string;
verifier: address;
isWhitelisted: bool;
verifier: address;
isWhitelisted: bool;
}
Name | Type | Description |
---|---|---|
templateId | uint256 | The ID of the template associated with the collection. You can check available IDs on the mQuark Template contraact here and check isTemplateIdExist or getLastTemplateId and check the whether the Template fits to your collection calling templateUri or you can simple query templates on our subgraph |
collectionURIs | string[] | The URIs associated with the collection |
totalSupply | uint256 | The total supply of tokens in the collection |
mintPrice | uint256 | The price of minting a token in the collection. It can't be lower than the selected template price but it can be free(0) however it will be locked to subscribtion fetaures |
mintPerAccountLimit | uint8 | The maximum number of tokens that can be minted per wallet |
name | string | The name of the collection |
symbol | string | The symbol of the collection |
verifier | address | The address of the verifier contract (It should be a trusted wallet) |
isWhitelisted | bool | A flag indicating if the collection is whitelisted |
Example input shown below (It can be used on mumbai network):
[1, ["https://mquark.infura-ipfs.io/ipfs/QmXvgn4mjfdyENsRGw6KmQniW2TVBEVGMzztLyyPiNb7wC"], "10000000000", "10000000000", 5, "CARS", "CAR", "0x5AEDA56215b167893e80B4fE645BA6d5Bab767DE", false];
Furthet details can be found here.