Harmony: Deploy an HRC721 NFT on Harmony with IPFS
Learn how to deploy an HRC721 NFT on Harmony with IPFS.
Last updated
Was this helpful?
Learn how to deploy an HRC721 NFT on Harmony with IPFS.
Last updated
Was this helpful?
Harmony is a blockchain network for decentralized applications that supports fully scalable architecture and secure random sharding. The Harmony network runs Thereum applications at a fraction of the gas fee price.
HRC721 is a token type that uses the ERC721 token standard but is deployed on the Harmony blockchain network.
Read below to learn how to deploy an HRC721 NFT on Harmony with IPFS.
To do this, navigate to . If you don’t have an account already, , then log in.
Select ‘Create Bucket’ in the top right corner to create a new bucket for your NFTs.
Bucket names must be unique across all Filebase users, be between 3 and 63 characters long, and can contain only lowercase characters, numbers, and dashes.
Once uploaded, they will be listed in the bucket.
Choose the method you prefer, and take note of the IPFS CID for each image you uploaded. We will reference this later.
NFTTokenBaseURL.json
with the following content:Replace the names and descriptions to match your collection, and replace each IPFS_CID
with the IPFS CID for each image you uploaded to Filebase.
NFTToken0.json
with the following content:This file holds the metadata for only Token0, whereas the first .json file held the metadata for all tokens.
Replace the names and descriptions to match your collection, and replace each IPFS_CID
with the IPFS CID for the image that corresponds to your Token0.
Upload both your NFTTokenBaseURL.json and NFTToken0.json files to your IPFS bucket. Take note of the IPFS CIDs for each of these files.
If not, activate this plugin.
We’ll use ERC721PresetMinterPauserAutoId, which is a preset ERC721 contract. To use this contract, create a new file in the ‘contracts’ folder by selecting ‘Create New File’, then give the new file the name OpenZeppelinPresetContracts.sol
You will see a variety of files that were imported during the compilation.
Environment: JavaScript VM (London)
Gas Limit: 5000000
Contract: ERC721PresetMiunterPauserAutoID
Then select the drop down menu to the right of ‘Deploy’ to open the String Name, String Symbol, and Base URI fields.
Enter the following details:
Name: Name for your NFT
Symbol: NFT Symbol
Replace IPFS_CID
with the IPFS CID of your Token0 NFT.
When finished, select ‘Transact’.
Copy your local wallet address, which is the ‘From’ value:
Then select the orange ‘mint’ button to mint. You can view the details of the minting transaction in the console output:
To do this, we need to configure our Metamask wallet to be on the Harmony Testnet, and we need some Testnet tokens from the Harmony Faucet.
Gas Limit: 5000000
Contract: ERC721PresetMiunterPauserAutoID
Name: Name for your NFT
Symbol: NFT Symbol
Replace IPFS_CID
with the IPFS CID of your Token0 NFT.
Then select ‘Transact’.
Congratulations! You have successfully created an NFT on the Harmony Testnet!
Navigate to the in your web browser.
BASEURI:
View the Harmony Metamask configuration instructions .
View the Harmony Faucet Information .
BASEURI: