A guide: control your metadata harnessing the power of the decentralized web


As you know, there are several platforms to mint through. Currently, the best option for artists is Manifold studio. They provide us with an out-of-the-box minter with hosting on the Arweave blockchain.  In this guide, I am going to focus on decentralized options. There are other, more straightforward approaches, but they still rely on centralized providers. While this approach may consist of a bit more work, it does provide the benefit of editable metadata, which opens the door for more creativity and dynamic NFTs. It also allows us to mint in batches and offers the ability to edit metadata after minting. So we can save on gas! If we want to build a decentralized future, WE ALL need to contribute to its success.  What you need:  IPFS and IPNS keyVisual Studio (optional)Web3.storage API key (optional)ENS domain A Manifold NFT contractWebsite builder (I use Nicepage, an Open-source, accessible drag n drop interface)Laptop / Desktop
Let's start with IPFS, The interplanetary file system. A network of peers sharing a small chunk of storage on their local devices (default=10GB.) This network provides immutable data using sha2-256 encryption. This method uses the bytecode of your file, encrypts it using private/public key pairs (not your eth keys, don't worry), and provides a public hash. The hash, also known as CID, represents the file. This file is retrievable as long as the CID remains pinned to at least one node on the IPFS network. . There are a few things to consider when using IPFS. There is no server, just the network and the nodes that power it. Your node is essential not only to you but to your peers. Since there are no servers, the best practice is to use a computer you can leave on. I've used an old desktop computer (2004) for the past two years with zero issues.   Please note that IPFS is still in alpha, so use it at your own risk. You can read more about it and download it from https://ipfs.io. Once you have it downloaded, click through the setup and make sure your daemon is running. Pop open the terminal or command prompt, and type in:
 ipfs daemon   Next, we will need to upload our metadata and host it through a static website. This step is a bit technical, but I will guide you step by step.  

1.Generate an IPNS Key:
Open a new terminal window and type in:
 ipfs key gen metadata
This function will print out a public key that we can use to find our content. Highlight your key and copy it.

2. Open a browser, navigate to ENS.domains, select the domain you want to use, click on "edit," and scroll down to the content section. In the content field, type
 ipns:// [and paste the key you copied in step one]
 The entered text will turn green on ENS, and you can click save and submit. Note this requires a blockchain transaction, which will require you to pay a gas fee. 

***BEFORE YOU CONTINUE - Please note that once you change your contract URI, you will not be able to mint using this contract on Manifold Studio. You can test this on a test net contract or create a dedicated smart contract to use with your dynamic NFTs.  

3. Head to studio.manifold.xyz and copy your NFT contract address. In your browser, navigate to https://etherscan.io. Paste the address in the search bar on etherscan and click enter.Scroll down the page and click on write as "proxy."Scroll down to "Set base URI" and input your ENS domain in the following format: https://<yourname>.eth.limo/json/
Example: https://garboz.eth.limo/json/ — Make sure to include the last forward slash, or it will not work. Next, we need to mint our token(s). Mint however many you want, you can edit them later. If gas is cheap, I usually do ten or so. To mint a batch on etherscan, scroll up to "mint base batch" and input the number of tokens you want to mint, approve the transaction and continue to the next step. There are two options for DNS linking, one provided by Cloudflare (".link") and the fantastic team at Eth Limo using (".limo"). I prefer limo because they update content faster and provide a great experience. I wish ENS didn't need the DNS linking options for this, but I couldn't get this to work using just an IPNS hash the last time I tested it. So, until ENS and NFTs are on the same page, we will have to use a DNS link. Read more here (ipfs.io/ipns/docs.ipfs.io/concepts/dnslink/) about DNS linking.  

4. Next, we need to create a static page to host our metadata. There are many ways we can do this, but for ease of use, I will use Nicepage. Download and install Nicepage https://nicepage.com Open it and click on "new website." You can choose to either build out an entire website or save a blank page. We need this basically for the index.html file and the folder structure. Click "export page" and choose where you save. I use visual studio code because it provides an interface to see our folder structure in one place and has fantastic plugins. Navigate to the folder we just created and pop it open. Add an empty folder named "json" all lowercase because IPFS is case sensitive. 

5. Now, we need to create our metadata. Here is an example json that you can copy and paste. Under your main website folder, click on "new file." Name this file "1" Paste the data and replace my metadata with your own. For "image URL" replace "garboz.eth" with your eth domain. This will make more sense in a minute. Save and close the file. *if visual studio adds the file extension .json, we need to remove it. Right-click on the metadata file and click rename. Remove ".json" and press enter.Next, we need to add our image to the images folder. Add the image you want to display on your NFT to your website's "images" folder.To make it easier I number images according to their respective token numbers, EXAMPLE: 1.png, 1.gif, or 1.jpg. 
 
6. Open up IPFS web UI or desktop app, depending on which one you downloaded. Upload the folder that we created using nicepage. After the upload has finished, make sure to click on "pin!" Copy the CID provided by ipfs.

7. Next, we need to add this CID to the key we created in step 1.  To do this, pop open the terminal again and type in the following: ipfs name publish <PASTE CID HERE> --key=metadata and press enter. It will take about 30 seconds or more to return a message saying that your pin was successful. 
That's it, go to whichever platform you prefer, click your token, and update the metadata. It could take a few minutes, but it will show up. If you need to make changes, complete the changes to the metadata file in the website folder and repeat steps 6 and 7. I will try to keep this updated and add images soon. Please reach out to me on Twitter with questions or feedback!  

Tips

ih0dl.eth