Harmony: Deploy an HRC721 NFT on Harmony with IPFS
Learn how to deploy an HRC721 NFT on Harmony with IPFS.
What is Harmony?
What is HRC721?
1. We’ll start by uploading our images to Filebase for us to use.
2. Select ‘Buckets’ from the left side bar menu, or navigate to console.filebase.com/buckets.

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. 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.

7. Next, on your local machine, create a new file called NFTTokenBaseURL.json with the following content:
NFTTokenBaseURL.json with the following content:8. Make another new file called NFTToken0.json with the following content:
NFTToken0.json with the following content:9. Next, head back to your Filebase web console.
10. Next, we’ll use Remix Development Environment for deploying our smart contracts and minting our NFTs.

11. Select the ‘Plugin Manager’ button on the bottom left.

12. Confirm that the ‘Solidity Compiler’ is set as ‘Active’.

13. Create a new Remix workspace by selecting the plus sign button next to ‘Workspaces’:

14. Give your workspace a name:

15. Create the following directories in your new workspace:

16. Now we need a smart contract.

17. Enter the following content in this file:
18. Next, select the Solidity Compiler on the left side bar menu.

19. Select the version of the compiler that matches the file’s specified compiler (in this case, 0.7.0), then select ‘Compile OpenZeppelinPresetContracts.sol’.

20. Once compiled, go back to the File Explorer screen.

21. Next, select the ‘Deploy and Run Transactions’ tab on the left side bar menu.

22. Select the following configuration details:


23. Once transacted, your transaction will be recorded:

24. Select the drop down menu to the right of your deployed contract’s name to reveal a variety of options for interacting with your NFT.

25. In the console output at the bottom of the Remix window, expand the details of your Transaction.

26. Head back to the Deployed Contracts interaction options, then in the ‘Mint’ field, enter your copied Wallet address inside quotation marks:


27. Now, let’s deploy onto the Harmony Testnet.
28. In the Deploy and Run Transactions tab, change the Environment from JavaScriptVM (London) to Injected Web3

29. Metamask will confirm the wallet account you want to use.

30. Make sure the other configuration settings are the same as we configured before:

31. Metamask will ask you to authorize and confirm the transaction:

32. The successful contract deployment will be shown on Metamask and in the Remix console output:


33. Then under ‘Transactions Recorded’, open the drop-down menu, and in the ‘mint’ field, input your Metamask Wallet Address in quotations, then select ‘mint’:

34. You will be prompted to authorize and confirm the transaction through Metamask again:

35. The successful transaction output will be listed in your Remix console:

Last updated