This tutorial only works on x86_64 chip and does not work on Apple Sillicon (M1 Chip). Some C++ libraries (ex: cairo) may fail. If you are on M1 chip, I strongly recommend you to use a Linux VPS. Here are some options:
For Linux / Windows developers, you could choose whistle (open source) or postman.
Setup Arweave Wallet
Follow this doc to setup your Arweave wallet and claim free AR token by completing assigned task.
You should have a downloaded key file after the setup. We will need the keyfile in the rest of the tutorial.
Part 1: Generate Art Works
Modify hashlips_art_engine
Additionally, we have to make a few small changes in the codebase to export the data with desired format.
Next, replace the source code of hashlips_art_engine/src/main.js with the code from the example.
Here are the changes we made:
Config hashlips_art_engine
Replace the source code of hashlips_art_engine/src/config.js with the code from the example.
Here are the changes we made:
Build Images
Copy solmeet-3-sandbox to hashlips_art_engine:
Set the rarity for each trait by adding a weight number in filename. In this tutorial, we will keep every value the same weight in a certain trait.
After updating the filenames, you should have the following results:
Finally, build the images:
This will export the images to images folder and a _metadata.csv file, both under build folder.
Note: You can compute the distribution of rarity by this command:
Part 2: Upload to Arweave
Setup Arweave Wallet
Follow this doc to setup your Arweave wallet and claim free AR token by completing assigned task.
You should have a downloaded key file after the setup. We will need the keyfile in the rest of the tutorial.
Modify arweave-image-uploader
Install dotenv:
Copy the whole string from the downloaded key file and paste to new .env file:
Replace the source code of arweave-image-uploader/uploader.js with the code from the example.
Here are the changes we made:
Notice: make sure that the address of creators is the same as the mint transaction sender, which is the Solana cli wallet. You can double check via this command:
Upload Images
Copy the images and metadata to arweave-image-uploader:
Upload to Arweave:
After uploading, you should see a output file arweave-uris.json under public folder. This is the uris of all the metadata. We will soon use it for minting in the next step.
Also, you can access your image and metadata by visiting the uri. For example: