![]() ![]() Here's an example of a tokenURI (opens in a new tab) ↗, which contains an NFT's metadata. ![]() Usually, this minting function requires you to pass in two variables as parameters, first the recipient, which specifies the address that will receive your freshly minted NFT, and second the NFT's tokenURI, a string that resolves to a JSON document describing the NFT's metadata.Īn NFT's metadata is really what brings it to life, allowing it to have properties, such as a name, description, image (or different digital asset), and other attributes. The biggest difference between the two NFT smart contract standards is that ERC-1155 is a multi-token standard and includes batch functionality, whereas with the ERC-721 is a single-token standard and therefore only supports transferring one token at a time. It involves two steps: Publish an NFT smart contract on the Ethereum blockchain Without further ado, let's get started! Making NFTs 101īefore we even start looking at any code, it's important to understand how making an NFT works. Sign up for a free account here (opens in a new tab) ↗. For the more visual learners, we highly recommend this excellent Full Modern React Tutorial (opens in a new tab) ↗ video series by Net Ninja.Īnd if you haven't already, you'll definitely need an Alchemy account to complete this tutorial as well as build anything on the blockchain. If you've never heard of any of those terms before, you may want to check out this Intro to React tutorial (opens in a new tab) ↗. Instead, we'll be focusing on bringing functionality to our project.Īs a prerequisite, you should have a beginner-level understanding of React-know how components, props, useState/useEffect, and basic function calling works. Because this tutorial is primarily focused on Web3 development, we won't be spending much time breaking down React fundamentals. ![]() In this tutorial, we will be using React (opens in a new tab) ↗ as our frontend framework. Call smart contract methods from your frontend.Connect to MetaMask via your frontend project.One of the greatest challenges for developers coming from a Web2 background is figuring out how to connect your smart contract to a frontend project and interact with it.īy building an NFT minter - a simple UI where you can input a link to your digital asset, a title, and a description - you'll learn how to: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |