NFT.storage (script)
If you already performed the previous step (NFT.storage) ignore this tutorial.
In this guide, we will be using NFT.storage (which works with IPFS) and an upload script.
Get NFT Storage API Key
Sign up for NFT.storage, and head to the API keys section. Select the "New Key" button.
Give the new API key a name...
Finally, click "Create" to generate a new API key. This will take you to a page listing the key. Simply press the "Copy" button to copy it for use in the next section.
Setup Config
Open your config.js
file in your favorite text editor and add the corresponding API key to the nftStorageApiKey
field. For example:
You can leave nftStorageEndpoint
as https://api.nft.storage
.
Make sure the rest of config.js
is filled out according to your project needs. It's particularly important to note the Collection Info section. This information will be used for generating metadata about your collection, and will control how it is displayed in the UI.
NOTE: image
here in the Collection Info config is the image that is used when your collection is displayed in the UI. The nft-storage-upload
script will upload this image to IPFS for you.
After filling out your config, and double checking all the details, you're now ready to upload your project to IPFS! Simply run:
This will output a baseTokenUri
. Be sure to add it to your config.js
file.
With your assets uploaded to IPFS, you are now ready to instantiate your smart contracts.
Last updated