Skip to main content

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;
}
NameTypeDescription
templateIduint256The 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
collectionURIsstring[]The URIs associated with the collection
totalSupplyuint256The total supply of tokens in the collection
mintPriceuint256The 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
mintPerAccountLimituint8The maximum number of tokens that can be minted per wallet
namestringThe name of the collection
symbolstringThe symbol of the collection
verifieraddressThe address of the verifier contract (It should be a trusted wallet)
isWhitelistedboolA 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.