![]() ![]()
We also need to keep note of the contract ABI, which indicates details of the various functions available in the smart contract. Make sure you keep note of the contract address, as we need it in the frontend to interact with the contract. By clicking on that, you can see the various functions and execute them, but we will interact with this smart contract directly through our Next.js app. Now in the Deployed contracts section of the Deploy tab, you should see your deployment and contract address. It will take a few seconds for the process to complete. Press Confirm to confirm the transaction and deploy the contract on the blockchain. You should see a MetaMask popup similar to this: Visual studio for mac solidity full#Make sure you are connected to Rinkeby network on MetaMask and you have some test ETH (which you can get from any faucet), as the contract will be deployed on the connected network.Īlso, make sure that you have the correct contract set to deploy (select the last one in the list, as the list is full of OpenZeppelin contracts). Go to the Deploy tab, and you should see the following configuration: Compile the contract by pressing Control+S (Windows) or Command+S (Mac). Then, we are setting a token URI for the NFT. We use the _safeMint function to mint the NFT, and pass in msg.sender (which indicates that the NFT should go into the wallet from which the request was sent) and the _uri as the parameters. We will be passing in the metadata URL as uri in the parameter so that we can store the metadata.įinally, we are getting the number of tokens so that we can get the current token ID and assign it to a new NFT. Next, we are creating a mint function, which will perform the NFT minting operation. You can change the parameters accordingly. Import MinterYT is ERC721, ERC721Enumerable, ERC721URIStorage. ![]() I’ve named it NFTMinter.sol: // SPDX-License-Identifier: Unlicense Open Remix IDE, and under the contracts folder, create a new Solidity file. Setting up our contractīefore we move on with the frontend of the NFT minter, we need to create and deploy a smart contract on the Rinkeby Ethereum blockchain. Visual studio for mac solidity free#If you get stuck somewhere in the tutorial, feel free to refer to the GitHub repository.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |