3. Add assets and metadata
Stargaze's sg721 contract allows for off-chain metadata storage. We recommend using a decentralized storage solution such as IPFS.
In this guide, we will cover basic project structure as well as using NFT.storage or Pinata to upload your project to IPFS.
Add your NFT images and metadata
.jsonfiles to the respective
metadatafolders. Your project should be structured like this:
Files should be numbered sequentially and there should be a matching metadata file for each image.
NOTE: It is very important that each of the images are numbered sequentially and have corresponding metadata files.
NOTE: If using NFT.storage, remove the .json extension from metadata files or switch to the branch
NOTE: Images can be JPG, PNG, SVG, GIF. We are adding support for other formats soon.
Sample metadata files are available in
/metadata. Let's take a look at one of them.
NOTE: use animation_url for multimedia content
"description": "Just some guy that likes to code and listen to Stargaze Trooprs music.",
"name": "Shane Stargaze"
After setting up your project, upload the files to IPFS using one of our guides:
NFT.storage is free to use. The UI can be used to upload assets, but a script is also provided for convenience.
After following the steps in the guides above, you'll receive a
baseTokenUrifor your project. This way, the contract knows how to associate each token ID with an individual token URI without having to send the contract a list of URIs. All token URIs can be determined by appending the token ID to the base URL.
Be sure to update your