Infura: Create an NFT Contract Factory with Metadata stored on IPFS
Learn how to create an NFT Contract Factory that stores metadata on IPFS.
What is an NFT Contract?
What is Metadata?
1. First, we need to upload the NFT image files to IPFS through Filebase.
2. Select ‘Buckets’ from the left side bar menu, or navigate to.

3. Enter a bucket name and choose the IPFS storage network to create the bucket.

4. Next, select the bucket from your list of buckets, then select ‘Upload’ in the top right corner to upload your image files.

5. Select your images to be uploaded.

6. Click on each uploaded object to display the metadata for the object.

7. Next, create a new directory for your project’s files and navigate inside of that directory.
8. Initialize your npm workspace:
9. Install Truffle and Ganche into your project:
10. Unbox the truffle package:
11. Navigate into the contracts directory.
12. Next, login to the Infura.io console. Create a new project.

13. Select the Ethereum network, and give your project a name.

14. In the Project settings, select "Ropsten” from the endpoint dropdown menu.

15. Then, take down the Project ID. You will need this in the next step.

16. Open the truffle-config.js file and replace the contents with the following content:
truffle-config.js file and replace the contents with the following content:17. In the migrations directory, update the existing file 2_deploy_contracts.js with the following content:
2_deploy_contracts.js with the following content:18. Next, launch the Truffle development console with the command:
19. Deploy all the contracts with the command:
20. In your Truffle console, use the following command to create a new instance of your contract:
21. Then, in the same Truffle console, mint your NFTs.
Last updated