Stargaze: Create an NFT Collection Using IPFS and Stargaze
Learn how to create an NFT Collection using IPFS and stargaze.
What is Stargaze?
Stargaze is the first interoperable layer-1 network for NFTs, providing features such as zero gas fees, a native NFT launchpad and marketplace, and interoperability with the Cosmos and Ethereum networks.
Read below to learn how to create an NFT Collection using IPFS and stargaze.
1. Start by opening a new terminal window. Run the following commands to clone the Stargaze public tools and create a new project:
git clone https://github.com/public-awesome/stargaze-tools stargaze-filebase
cd stargaze-filebase
yarn install
2. Create a testnet account with the command:
yarn account
Copy the output of this command, you will need it in the next step.
3. Make a copy of the config.example.js
file called config.js
.
config.example.js
file called config.js
.Open the config.js
file and fill in the mnemonic and address fields with the information from the previous command’s output.
4. Receive some testnet funds by joining the Stargaze Discord server and requesting testnet stars in the #faucet channel.
5. Next, we need to create an IPFS bucket on Filebase.
To do this, navigate to console.filebase.com. If you don’t have an account already, sign up, then log in.
6. Select ‘Buckets’ from the left sidebar menu, or navigate to.
Select ‘Create Bucket’ in the top right corner to create a new bucket for your NFTs.
7. Enter a bucket name and choose the IPFS storage network to create the bucket.
Bucket names must be unique across all Filebase users, be between 3 and 63 characters long, and can contain only lowercase characters, numbers, and dashes.
8. Now, upload your NFTs to Filebase using the web console and selecting ‘Folder’, then select the folder that contains your NFT files.
These files need to be named in sequential order, such as 0.png, 1.png, 2.png, etc.
You may also include metadata.json files in this folder, if desired. The .json file for each NFT should be in the format:
9. You will see your folder uploaded as a single object:
10. Copy the CID of your folder:
11. Navigate to your IPFS Folder using the Filebase IPFS gateway to see your folder’s files:
https://ipfs.filebase.io/ipfs/IPFS_CID
12. In your config.js
file, configure the following lines to reflect your NFT collection’s information:
config.js
file, configure the following lines to reflect your NFT collection’s information:Replace IPFS_CID
with your IPFS folder’s CID that you copied previously.
13. Then, configure the following lines to determine mint price, number of NFTs allowed per wallet, and other factors:
14. Save your configuration file.
15. To whitelist an address or list of addresses, use the following command:
yarn whitelist --add 'address1,address2,address3,...address100'
16. Next, get your minter’s contract using the following command:
yarn minter
Then, copy the first contract_address
value, and input it for the minter contract address, then copy the second contract_address
value and input it for the SG721 contract address in the config.js
file:
17. To mint an NFT to a specific address, use the command:
yarn mint --to [address]
This will mint the next sequential token ID to the specified address.
18. To verify that everything is working as expected, you can view testnet transactions using the Stargaze testnet explorer.
19. If you’re ready to launch this project on the Stargaze mainnet network, you can follow this tutorial.
Last updated