# NFT Submit Collection and Mint ## MainNet data Collection: https://app.stargaze.zone/launchpad/stars1cpzvvmlrc9lcw3q5yrznax0uk5h6xww2d4ch9xve4xu8mfvgw2kqepnwd2 The minter contract address: * minter: 'stars1cpzvvmlrc9lcw3q5yrznax0uk5h6xww2d4ch9xve4xu8mfvgw2kqepnwd2', SG721 contract address: * sg721: 'stars1w4dff5myjyzymk8tkpjrzj6gnv352hcdpt2dszweqnff927a9xmqc7e0gv', ## Testnet procedure Steps (no detailed) 1. Create and config collection 1.1. Create the Main Account 1.2. Fund the account with Stars for create the contract etc. 1.3. Pack the images 1.4. Pack the metadata 1.4.1 Prepare the metadata for collection 1.4.2 When the CID is added to the metadata files and are in the proper folder 1.5. Upload metadata to storage 3. Minter form address contrat to list in UI 4. Mint on eligible address (bcna/osmo/atom) --------------------- TO BE CLEAR BEFORE MAINET 1) // The 3-7 letter ticker symbol for your collection symbol: 'BCNAWEE', —> <span style="color:green">**>>> "BCNABUD"** OK</span> 2) // Comment out both below if not using royalites royaltyPaymentAddress: 'stars1dkgvny454n6aylfmvr086v5xwsznc77kelrnpd', <span style="color:green"> **>>> stars1dkgvny454n6aylfmvr086v5xwsznc77kelrnpd</span> 3) // The price (in STARS) for your NFTs (minimum 50 STARS) unitPrice: 50, <span style="color:green"> **>>> 420 STARS** OK</span> <span style="color:green"> **>>> Mint date 09-05-2022**</span> 4) // The max amount of NFTs an address can mint perAddressLimit: 10, <span style="color:green">**>>> 42** OK </span> 5) Define a image or gif for the NFT, at this moment Atm0ner put a gif pointing to his website: <span style="color:green">image: 'https://bafybeifcbky4ni4z27jpcj5qjnb2ufh2nlb46aelvxga2m5wzzxtsthlyy.ipfs.nftstorage.link/', **We have to create a GIF with the most rare pictures. To be done in the coming weeks. Johan will take care of this**</span> 6) External_link is optional. Gif compatible. The same BUT a link to our info, it could be a Medium article about our NFT, our permanent link to our website or to our GitHub external_link: 'www.bitcanna.io', <span style="color:green"> **Main website www.bitcanna.io**</span> 7) Image of the cover: // (at least 500 x 500 pixels) <span style="color:green"> image: 'https://bafybeifcbky4ni4z27jpcj5qjnb2ufh2nlb46aelvxga2m5wzzxtsthlyy.ipfs.nftstorage.link/'</span> Those all params, need to be defined for MAINNET launch. And each one can’t be modified later … so think about it @MrCoinnaisseur @johanbitcanna ABOUT DISTRIBUTION We will establish two or three stages: Stage 0 - We get the NFTs we want for Team & Marketing Stage 1 - Airdrop to selected users Stage 2 - Open to Stargaze and world ----------------------- ## 1. Create and config collection To configure and submit a collection, you must follow this tutorial to the letter. https://docs.stargaze.zone/guides/readme 1. Create the Main Account: ``` ts-node scripts/account.ts mnemonic: see keybase pubkey: { type: '???', value: '???' } address: stars1xaa2hsl6ypyl74e2m0ts0d5vhlyrjqvp9c5fp2 ``` 2. Fund the account with Stars for create the contract etc. * Minimum Mint Price: 50 stars * Collection Creation Fee: 1000 stars * Max Number of Tokens: `10000` The first TX (InstantiateContract) will cost: 1000STARS The second TX (a single drop) will cost: 0 STARS A new Public Mint give to the contract owner 50STARS - 5STARS for royalties 3. Pack the images There will be work to do on the structure of the images + json, like this ``` Project Folder: - images - 1.png - 2.png - 3.png - metadata - 1 - 2 - 3 ``` This command could be useful to rename the files: `rename 's/0*([0-9]*)/$1/g' *.png ` Packing the images as a CAR file. ``` yarn run pack-images yarn run v1.22.15 ---> Updated: 22/03 at 12:19 $ ipfs-car --pack images --output images.car root CID: bafybeia45l2eflxa4xx7ii6mhekyhh5xnucudj5tzp2upzcoeqfl4uzdr4 output: images.car Done in 151.49s. ``` When I upload to BitCanna account give me this CID: `bafybeia45l2eflxa4xx7ii6mhekyhh5xnucudj5tzp2upzcoeqfl4uzdr4` 4. Pack the metadata We need to process the original NFT json metadata files to produce a valid Stargaze metadata file. 4.1. Prepare the metadata for collection * Required transformations: Go through the JSON file and make a `foreach` in every image. **For each NFT:** 1. `image` field: add `CID` value when images are uploaded (Step 3) Add to value -> `//ipfs://bafybeia45l2eflxa4xx7ii6mhekyhh5xnucudj5tzp2upzcoeqfl4uzdr4/images/` 2. Get `edition` value field and use as `metadata_file` var in the script 3. Add `external_url` with value `"https://example.com/?token_id=1"` > For 3. We must think that we will not be able to edit the json so I think we should create a page on bitcanna.io (wp) and make an article on our nft and add the link in the json 4. Change description of the Collection by: `Weed Man are a collection of 8420 non-fungible token` 5. Write the transformed data at: `metadata/+metadata_file` 4.2. When the CID is added to the metadata files and are in the proper folder: `rm metadata.car` if exist `yarn run pack-metadata` it shows: ``` yarn run v1.22.15 $ ipfs-car --pack metadata --output metadata.car root CID: bafybeig4cllp3jviimsuvanfutkfef3jze3i3mo4gzrjggyvenjk3tfqsm output: metadata.car Done in 10.50s. ``` this should be the `BaseUrl` ``` baseTokenUri: 'ipfs://bafybeig4cllp3jviimsuvanfutkfef3jze3i3mo4gzrjggyvenjk3tfqsm/metadata', ``` 5. Upload metadata to storage: `yarn run nft-storage-upload` ``` baseTokenUri: ipfs://bafybeig4cllp3jviimsuvanfutkfef3jze3i3mo4gzrjggyvenjk3tfqsm/metadata Done in 11.50s. ``` # Config file Example on Testnet about the `config.js` > For startTime variable, use: https://www.utctime.net/ > Last update about CASTOR-1 Testnet: https://github.com/public-awesome/stargaze-tools/pull/159/files ``` /* * This is the main config for your NFT sale. * * Fill this out with all your project details. */ module.exports = { //// ACCOUNT INFO //// // The account seed phrase to use for deployment mnemonic: 'see keybase', // Your STARS address account: 'stars1xaa2hsl6ypyl74e2m0ts0d5vhlyrjqvp9c5fp2', //// API CONFIG //// // The RPC endpoint for Stargaze, Big Bang Testnet //rpcEndpoint: 'https://rpc.castor-1.stargaze-apis.com/', // The RPC endpoint for Stargaze, mainnet rpcEndpoint: 'https://rpc.stargaze-apis.com/', // NFT.storage endpoint nftStorageEndpoint: 'https://api.nft.storage', // NFT.storage API key **changed to BitCanna *** nftStorageApiKey: 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJkaWQ6ZXRocjoweDBjNGE1RTcwZTNlMjg1Nzc1NUMwN2MwNUZlODk4MzY2MDE1ZTM5MmYiLCJpc3MiOiJuZnQtc3RvcmFnZSIsImlhdCI6MTY0Nzk1MzE5MzE5MCwibmFtZSI6Ik5GVF9CdWRkaGVhZCJ9.RTrXxMOh7sACygxAmUz9ug9fgKRpykGSQn0co_O54Ck', // Pinata API Key (optional) pinataApiKey: '', // Pinata Secret Key (optional) pinataSecretKey: '', //// COLLECTION INFO //// // The name of your collection name: 'BitCanna Buddheads', // The 3-7 letter ticker symbol for your collection symbol: 'BCNABUD', // Project description description: 'BitCanna Buddheads is a collection of 8420 unique ‘Buddheads’ NFTs–digital collectibles living in the Cosmos Universe.', // Link to image to use as the main image for the collection. // Either IPFS or valid http links allowed. Gif compatible. // (at least 500 x 500 pixels) image: 'ipfs://bafybeifcbky4ni4z27jpcj5qjnb2ufh2nlb46aelvxga2m5wzzxtsthlyy', // External_link is optional. Gif compatible external_link: 'https://www.bitcanna.io', // The address for royalites to go to (may be the same as `account`) // Comment out both below if not using royalites royaltyPaymentAddress: 'stars1dkgvny454n6aylfmvr086v5xwsznc77kelrnpd', //Royalty share: 1 = 100%, 0.1 = 10% royaltyShare: '0.05', //// MINTER CONTRACT //// // The base URI to be used to programatically mint tokens baseTokenUri:'ipfs://bafybeig4cllp3jviimsuvanfutkfef3jze3i3mo4gzrjggyvenjk3tfqsm/metadata', // The number of tokens to mint numTokens: 8420, // The price (in STARS) for your NFTs (minimum 50 STARS) unitPrice: 420, // The max amount of NFTs an address can mint perAddressLimit: 42, // The date when the sale goes live // If whitelist is enabled, only whitelisted addresses will be able to purchase // startTime in ISO format startTime: '2022-05-09T11:00:00.000Z', // The minter contract address // Get this after running `yarn minter` minter: 'stars1cpzvvmlrc9lcw3q5yrznax0uk5h6xww2d4ch9xve4xu8mfvgw2kqepnwd2', // SG721 contract address // Get this after running `yarn minter` sg721: 'stars1w4dff5myjyzymk8tkpjrzj6gnv352hcdpt2dszweqnff927a9xmqc7e0gv', // //// CONTRACT CODE IDs: Castor-1 Testnet //// // The code ID for sg721 //sg721CodeId: 1, // The code ID for the minter contract //minterCodeId: 2, // The code ID for the whitelist contract //whitelistCodeId: 3, //// CONTRACT CODE IDs: Mainnet //// // // The code ID for sg721 sg721CodeId: 1, // // The code ID for the minter contract minterCodeId: 2, // // The code ID for the whitelist contract whitelistCodeId: 3, }; ``` ## 2. Minter form address contract to list in UI > Launching a collection has a **1,000 STARS network fee**. 50% of this fee is burned, while the other half is sent to the Community Pool. In the future, this half will be distributed to Stargaze stakers. https://docs.stargaze.zone/guides/readme/4.-instantiate-sale-contract-on-testnet `yarn minter` You will need to validate the transaction. Once the transaction is completed, take the first address (in screen, number 1) of the contract Go on stargaze UI to see your collection: `https://big-bang.publicawesome.dev/launchpad/{_contract_address}` https://testnet.publicawesome.dev/launchpad/stars1xyem8vw65m25gc7ppxzgaq9z8gzjjzgthy0gcryhjftlumwh4rzs49nwzj ## 3. Mint on eligible address (bcna/osmo/atom) https://docs.stargaze.zone/guides/readme/5.-mint-from-your-contract For mint from stargze-tools you need to finish configuring the `config.js`. In the return of the minter command ([in the step 2](#2-Minter-form-address-contrat-to-list-in-UI)), take the first address and edit the variable `minter` with first address (in screen number 1) Search: `minter: 'stars1...',` Example: `minter: 'stars1d0ah60rk7qf7v8j7p6jk4ulkgpr7anuct06rjghh5fq9y8l83qxq4l33q0',` Edit the variable `sg721` with second address (in screen number 2) Search: `sg721: 'stars1...',` Example: `sg721: 'stars1h7gw65va22njjz04yhhedg7tyvxs074nq46t3xgfzld7j7kq28as6jngan',` ![](https://i.imgur.com/irXuHjB.png) 1. With stargaze-tools * Mint a specific NFT for an address `yarn mint --for [tokenId] [address]` Example: `yarn mint --for 1 stars1uu02cy0laaw65a3ssgkzqls6w5alnk6vrjtmmg` ![](https://i.imgur.com/SkbiNaN.png) * Mint to a specific address. `yarn mint --to [address]` Example: `yarn mint --to stars1uu02cy0laaw65a3ssgkzqls6w5alnk6vrjtmmg` ![](https://i.imgur.com/WHNjVqa.png) 2. Atmon3r script (for airdrop) Soon! (need some time) ### Very important for MAIN-NET We should mint the first 419 NFTs to the Team Address (stars1dkgvny454n6aylfmvr086v5xwsznc77kelrnpd) ``` yarn mint stars1dkgvny454n6aylfmvr086v5xwsznc77kelrnpd --batch 419 ``` ![](https://i.imgur.com/otV0Mkp.png) It could works out of gas, so we need to edit the line 14 of file `scripts/mint.ts` and change the gas price multiplicator to: ``` const mintFee = coins((config.whitelistPrice * 5000000).toString(), 'ustars'); ``` Example of batch minting: https://stargaze-testnet-explorer.pages.dev/stargaze/tx/CEC1D4899289619E1AD383A50629BFCF1B6B2BB3ACD83A6949C9E86F369C7F9C ## 4. Contract testnet - Friday 15th April https://testnet.publicawesome.dev/launchpad/stars177swpjf95t3ds94rfams3uym0sg9nfga8pujd488heu8dgjqsy7sw23slu ###### tags: `NFT` `Stargaze`