How to create your own NFT collection from scratch with no coding experience:
+ how we created pixelated pastries (coming soon..)
+ how we created pixelated pastries (coming soon..)
In order to get started, open terminal on your computer.
Enter “npm install -g yarn”, and press enter.
This will download yarn, a package manager we will be using later.
Enter “npm install -g yarn”, and press enter.
This will download yarn, a package manager we will be using later.
If you plan to use PNGs for your collection, being the simpler file type, head to the Hashlips Art Engine repo, which can be found here:
github.com
github.com
Once there, copy the link of the url and open a new terminal window.
Enter “git clone <URL>”.
To name it, simply add text after the URL.
Ex. “git clone <URL> test”
Open this folder on visual studio.
Enter “git clone <URL>”.
To name it, simply add text after the URL.
Ex. “git clone <URL> test”
Open this folder on visual studio.
Additionally, you may have noticed the “#” at the end of our file names.
This allows you to customize the rarities for your NFTs.
The way rarity can be determined is by adding up the “weights” for a specific folder, then dividing the value of one of them by that number.
This allows you to customize the rarities for your NFTs.
The way rarity can be determined is by adding up the “weights” for a specific folder, then dividing the value of one of them by that number.
For example, the total value of all the weights inside of my “Background” folder is 21000.
If I wanted to calculate the rarity for “Bakery Blue”, I would take 4200 and divide it by 21000.
This makes it seek 20% rarity.
If I wanted to calculate the rarity for “Bakery Blue”, I would take 4200 and divide it by 21000.
This makes it seek 20% rarity.
Now, head back to the “layerConfigurations” block inside of src/config.js that we discussed earlier.
This is where you will change the names inside to match the names of your Layers.
**After every change to the code, you must save the changes for them to take effect**
This is where you will change the names inside to match the names of your Layers.
**After every change to the code, you must save the changes for them to take effect**
Notice that I have set the “growEditionSizeTo” to 10.
This block of code will generate 10 NFTs by grabbing images from the folders I specify.
Starting with Background, it will pick a random image inside the folder, then move to plate and so on.
This block of code will generate 10 NFTs by grabbing images from the folders I specify.
Starting with Background, it will pick a random image inside the folder, then move to plate and so on.
Now it’s time to generate.
Open a new terminal using the project folder inside of VS code.
Type “Yarn” and hit enter.
This will install the project’s dependencies and make it ready for production.
After this, type “Yarn build” and hit enter.
Open a new terminal using the project folder inside of VS code.
Type “Yarn” and hit enter.
This will install the project’s dependencies and make it ready for production.
After this, type “Yarn build” and hit enter.
You don’t have anything to put into baseURI, which is what we’ll be doing now.
Head to pinata.cloud and register an account.
This is where we will be hosting the images and json files for our NFTs.
Head to pinata.cloud and register an account.
This is where we will be hosting the images and json files for our NFTs.
Click the blue “Upload” button, and navigate to your project folder, open build, and submit the images folder.
You’ll be given a “CID”, a long string of seemingly random numbers, which you need to copy to your clipboard.
You’ll be given a “CID”, a long string of seemingly random numbers, which you need to copy to your clipboard.
Head back into VS code under the Metadata section you were just at.
For baseURI, enter “ipfs://<YOUR CID HERE>”
File save, then open a new terminal and enter: “Node utils/update_info.js”
For baseURI, enter “ipfs://<YOUR CID HERE>”
File save, then open a new terminal and enter: “Node utils/update_info.js”
Ensure that the files you are uploading here are titled “1”, “2”, etc, rather than “1.json”, “2.json” and so on.
Type in your search bar “Remix.Ethereum.org remix.ethereum.org” and click the blue icon in the top left.
Next, click the GitHub button near the bottom of the page.
Here is where we will paste the URL link we just copied.
Next, click the GitHub button near the bottom of the page.
Here is where we will paste the URL link we just copied.
If you’re getting errors here, be sure to have every import included.
At the bottom, it will display errors that tell you which ones are missing.
All of which can be found on OpenZeppelins GitHub, and are imported using the same method described above.
At the bottom, it will display errors that tell you which ones are missing.
All of which can be found on OpenZeppelins GitHub, and are imported using the same method described above.
Once you enter these, hit “transact”, and follow through with the prompts in MM.
When it deploys, go back to Remix.
Click the plug icon displayed in the bottom left, and search for “Etherscan - Contract Verification”.
It will make a new icon for it on the left
When it deploys, go back to Remix.
Click the plug icon displayed in the bottom left, and search for “Etherscan - Contract Verification”.
It will make a new icon for it on the left
Are you still here? Congratulations, now it is time to get a bit more tasty…
PNGs are cool & all, but they are static once deployed. This is kind of boring.
PNGs are cool & all, but they are static once deployed. This is kind of boring.
To our luck, SVGs are very small file types which can be animated, or even change their display dynamically on-chain.
For the .@thebakerydao, we developed SVG NFTs with the Pastry NFT memberships.
For the .@thebakerydao, we developed SVG NFTs with the Pastry NFT memberships.
@theBakeryDAO With a few lines of code, these cute little pastries change display based on their subscription status.
Green and moldy if they are expired, pink if they are valid!
Green and moldy if they are expired, pink if they are valid!
@theBakeryDAO In the future, these mechanics will be used to let users “level up” from their contributions to the Bakery.
This is all made possible with the use of hooks. Hooks are external contracts that are used to alter the behavior of the pastry NFTs or trigger actions in other contracts.
This is all made possible with the use of hooks. Hooks are external contracts that are used to alter the behavior of the pastry NFTs or trigger actions in other contracts.
@theBakeryDAO On the baseTokenURI function, we can override functionality and use data URLs of our SVGs to tell the browser what to display 100% on-chain.
This process only requires a few simple steps, and the results are phenomenal.
This process only requires a few simple steps, and the results are phenomenal.
@theBakeryDAO First, grab an SVG you like.
Then, we will need to base64 encode our NFT, and use this for the image linked in the hook contract which will help to generate, encode, and return our NFTs based on different on-chain characteristics.
Then, we will need to base64 encode our NFT, and use this for the image linked in the hook contract which will help to generate, encode, and return our NFTs based on different on-chain characteristics.
@theBakeryDAO Once the hook contract is deployed, we can simply configure event hooks on our NFT contract to render different images based on what we define!
After all this hard work, you should now have dynamic, animated, and/or interactive on-chain SVG NFTs to show off in your collection!
After all this hard work, you should now have dynamic, animated, and/or interactive on-chain SVG NFTs to show off in your collection!
@theBakeryDAO It sounds confusing, but it’s not too bad
Im just a pastry on twitter.
If you have any troubles following the tutorial, feel free to dm me and i’ll try my best to help.
This took me 8+ hrs to write, so an RT on the first post would be much appreciated.
Im just a pastry on twitter.
If you have any troubles following the tutorial, feel free to dm me and i’ll try my best to help.
This took me 8+ hrs to write, so an RT on the first post would be much appreciated.
Loading suggestions...