Figment Datahub and Celo Network: Create an ERC1155 NFT on the Celo Network using Figment Datahub and Objects Stored on Filebase
Learn how to create a ERC1155 NFT on the Celo Network using Figment Datahub and objects stored on Filebase.
What is ERC1155?
What is Celo?
What is Figment DataHub?
1. Login to your Figment Datahub console. Select ‘Create App’ to create a new Celo app.

2. Give your app a name, select ‘Staging’ for the environment, then select ‘Celo’ for the network.

3. Once you’ve created your app, take note of the API key.

4. Next, we need a Filebase IPFS bucket.
5. Select ‘Buckets’ from the left side bar menu, or navigate to console.filebase.com/buckets.

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

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

8. Select an image to be uploaded.

9. You can view the object’s IPFS CID in the CID column, or you can click on your uploaded object to display the metadata for the object, which includes the IPFS CID.

10. Upload as many images as you’d like to use for your NFT collection and take note of the CID for each one.
11. Next, download and install S3FS-FUSE on a Linux or macOS system.
12. Set up Access Keys.
13. Mount your bucket.
14. Now, navigate into the mounted Filebase bucket.
15. Next, create a new folder to house your NFT collection scripts and navigate inside of it.
16. Initialize your npm workspace:
17. Then install the required npm dependencies:
18. Create a new Hardhat project with the following command:
19. Next, install the OpenZeppelin ERC1155 library with the following command:
20. Open the NFTCollection.sol file and input the following content:
NFTCollection.sol file and input the following content:21. In this file, replace the // TODO text with the following:
// TODO text with the following:22. For each NFT ID, create a .json file with the naming scheme of {id}.json.
.json file with the naming scheme of {id}.json.23. Next, add the following content into the NFTCollection.sol contract below the lines you created to list your NFT names and their values:
NFTCollection.sol contract below the lines you created to list your NFT names and their values:24. Next, open your hardhat.config.js file and set Solidity to the same version number that we set inside of our NFTCollection.sol contract:
hardhat.config.js file and set Solidity to the same version number that we set inside of our NFTCollection.sol contract:25. Before you can compile, you need to delete the file contracts/Greeter.sol.
contracts/Greeter.sol.26. Compile your smart contract with the command:
27. Now we need to create a Celo account to mint our contract on the Celo network.
28. In the hardhat.config.js file, enter the following lines to import the required Celo modules:
hardhat.config.js file, enter the following lines to import the required Celo modules:29. Next, create a file called celo_deploy.js.
celo_deploy.js.30. Open the hardhat.config.js file again and add another task for deploying our contract:
hardhat.config.js file again and add another task for deploying our contract:31. Run this celo-deploy script to deploy your contract:
PreviousFigment Datahub and Avalanche: Make an e-Voting dApp Using Figment Datahub, Avalanche, and FilebaseNextFlow
Last updated