New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

How to Create an NFT and store metadata on Swarm

SwarmMon, Oct 9, 2023, 12:00 AM

This video provides a comprehensive guide on deploying, minting, and importing NFTs on the Swarm Network. Github repository: https://github.com/rampall/nft-example Blogpost Article: https://blog.ethswarm.org/foundation/2023/how-to-create-an-nft-and-store-metadata-on-swarm/

Transcript

the bill on mask nft is a simple fun project to learn sworn fundamentals this is an extremely simple project in this video we'll walk you through the step-by-step process of deploying your own nft contract and maintain a unique nft where the image and the metadata is stored on Swarm but before we dive in let's ensure we have everything we need make sure you have node version 16 installed and running on your computer additionally download and set up the swarmdastic application and make sure it is funded and upgraded from an ultra light node to light node Begin by accessing the nft example project repository on GitHub clown the repository to your local machine and navigate to the projects directory to ensure all the required dependencies are installed run the command npm now let's deploy our nft contract on the ignosis blockchain we'll be using metamask as our ethereum wallet so if you don't have metamask wallet installed visit their website and set up a new account you should fund the account with a small amount of X die as these will be used for the deployment process in metamask click on the three dots next to your account address and select Account Details and then export private key store these private Keys securely as it will be used to deploy the contract in the project directory locate the file named Dot emv.example and rename it to dot EnV open the file and paste your private key after gnosis private key remember to include the 0x prefix this ensures that the deployment script can access your account and use the funds there to deploy the contract with their account set up on the private key configured it is time to deploy the nft contract open the terminal and navigate to the project directory execute the common npx hard hat run hyphen hyphen Network hypnosis scripts slash deployts to initiate the deployment process sit back and wait for the transaction to be confirmed fantastic now that our contract is deployed let's mean our very own billon mask nft start up the Swarm desktop application and ensure that you have sufficient balance of xdi and xbz tokens if needed you can acquire BCC tokens by following instructions on the Swarm website to proceed with minting we need a stamp in swarm desktop click on account stamps buy new postage stamp and purchase batch once the purchase is complete you will receive patch ID which we will use in the minting process open the mint TS file in the project directory and locate the constant postage batch ID replace the existing value with the batch ID you received after purchasing the stamp additionally update the token address with nft contract address obtained during the deployment process also make sure to set the value of two address to the wallet address where you would like to receive the nft we are now ready to Mint our Pelon musk nft in the terminal execute the command npx hard hat run hyphen hyphen Network's gnosis scripts slash mint TS to initiate the minting process sit back and watch as your unique nft is created on the blockchain fantastic now the demanding process is complete it is time to import your billon mask nft into your metamask wallet in metamask ensure you are connected to the ignosis chain Network then select the nft section scroll down and click on import nfts enter the nft contract address obtained during the deployment process and set the token ID to zero confirm the import and voila you should see your newly minted billon mask nft proudly displayed in your metamask wallet

Automatic transcript — names and jargon may be misspelled.