Deploying and Minting a Collection

Overview

This section of the docs will deal with deploying and then minting a collection on Aspen. Architecting and deploying an NFT solution via traditional web3 means involves a lot of heavy engineering work done on-chain with the potential for losses coming from minting tokens that collectors don't claim. Aspen APIs for deployment and minting ensure that the engineering is carefully abstracted away on chain with APIs providing 1:1 functionality and lazy minting providing the ability for cost saving by the creator and collection.

Before Proceeding

Before deployment can happen on Aspen, it is understood that a small list of actions have happened already

Collection is created
Tokens are created
Upload terms
Upload Token Content
Upload Attributes

and then the collection contract is ready to be deployed and minted.

Deploying on Aspen

Deploying on Aspen happens with a POST request to the Deploy Collection Contract endpoint. This endpoint requires the id of the collection as collected from the response of the Create Collection endpoint and that is all. Deployment has started.

A GET request to the Get Deployment Status endpoint returns a response object which contains a key called status that is important in querying the stage at which the deployment is.

Status has four states

statedescription
unknown deployment is not started. this instance doesn't know about the deployment
in queue queued for deployment.
processing in the process of deployment. deploying metadata, deploying contract
completed completed
errorerror with error messages

Minting on Aspen

With deployment is done, the next step is minting. Minting on Aspen is done with the POST Mint Collection Tokens endpoint

📘

Minting on Aspen has evolved

Minting on Aspen has evolved. Please be advised that the primary endpoint for minting has moved its functionality from when we offered premint to now that we offer lazy minting. Before now, calling the mint function mints all the tokens and keeps them inside our wallets for distribution, but now they are defined and then claimed at purchase. More on this below this tooltip

The powerhouse for minting on Aspen is the Lazy Mint function, and it allows for a token's metadata, images et al to be available on a decentralized storage system like IPFS but not claimed and minted on-chain. Lazy minting, claiming and claim conditions will be explored indepth in the distribution section but the first part is simply the practice of minting a token with a purchase rather than before it is collected.

A sample request for a mint looks like this

{
    "id": 1221
}