Create NFT on WB Network Testnet
Creating a contract for the future NFT
- Metamask and add WB Network to it. You can add a network to your wallet here;
- Test tokens. You can get it here;
- 15-20 minutes of your time.
- Go to the site and set all the parameters as in the screenshot. In the "Name" and "Symbol" fields, enter the desired name and ticker (leave the "Base URI" field empty). Then click "Open in Remix"
2. On the created file, we press the right mouse button, then "Flatten"
3. Switch to "yourfile_flatten.sol" and in the first line paste the code:
// SPDX-License-Identifier: MIT
4. Go to the section "Solidity compiler". On the tab bar at the top, switch to our first file (it's important!) and press "Compile contract"
5. Go to the section "Deploy & run". In the first paragraph, select the option "Injected Provider - Metamask", below it should display your wallet address and in the "Contract" field - the name of your contract. Then press "Deploy"
6. Confirm the transaction in the Metamask
7. If everything is done correctly, the address of the created contract will appear below
Contract verification
- Go to the site. In the first field we insert the address of the contract that we received in step 7 of the previous section, everything else is as in the screenshot. Press "Continue"
2. In the field "Contract file name" enter anyname.sol. In the "Solidity Contract Code" field, copy the entire code from yourfile_fletten.sol. Leave the rest of the settings on this page unchanged. Press "Verify and publish".
3. After passing the captcha, the following page will open
Creation of NFT and adding it to the Metamask
- Go to site and register on it
- After registration follow the link
- Fill in these three fields and press "Try It". After pressing, the code will appear below, we are only interested in the third line. Copy everything in quotes
4. On WB Explorer page enter the address of your wallet, go to tab "Deployed Contracts" and click on the contract we created earlier
5. Go to the relevant section of our contract and look for the line "safeMint". Enter the address of our wallet and what we copied in step 3. Press "Write"
6. After confirming the transaction in the Metamask, click "View Transaction"
7. Go to the "Logs" tab. Press "Decode" to find out the id of our nft and copy the address of the contract
8. Go to metamask and click "Import NFTs"
9. Enter the contract address, that we copied earlier, and the token ID, click "Add"
10. And now our nft is displayed in our metamask
To add nft in the Metamask mobile application, the procedure is similar