Cover photo

Testnet WhiteBIT Network. Full guide.

The Testnet has been running for 2 months already, and the hard fork is in 3 days. I don't know if a snapshot has been taken yet, but better late than never. My list of criteria for receiving the drop :

  • 50+ transactions

  • 3-4 unique days of usage

  • 2 weeks of usage

  • Minting your own token

  • Minting NFTs

  • Deployment of 5+ smart contracts (any type)

  • Verification of smart contract ownership rights

  • My assumption for the reward is 5-10 WBT ($30-$50) per account. You can create multiple wallets, but do not interact between them to avoid complications. That means do not send funds to your own wallets. So, let's start the guide.

Adding the Network to Metamask.

  1. Go to the WhiteBIT Explorer and click on "Select Network" in the bottom right corner.

  2. Choose the Metamask wallet from the options.

  3. Sign all transactions using your Metamask wallet.

post image

Next, in the top menu, click on the faucet and claim 1 test token to your wallet. To do this, paste your wallet address into the corresponding field.

post image

You will see the first coins appearing in your wallet.

Transaction filling.

First, we need to fill the number of transactions. To do this, go to the WhiteBIT Explorer and choose any block/transaction/token/NFT token. Copy any wallet address. Send 0.1 WBT (or a random amount to avoid a pattern) to 10-15 different addresses. Repeat this procedure for both WBT and the tokens you will create below (regular and NFT tokens).

post image
post image

Creating a WRC-20 Token.

  1. Go to the Wizard section. Here, you will be presented with various token creation options. To begin, we will create an ERC20 token.

  2. Select the ERC20 token creation option.

  3. Fill in the required details for your token:

    • Token Name: Choose a name for your token (e.g., MyToken).

    • Token Symbol: Provide a symbol for your token (e.g., MYT).

    • Total Supply: Specify the total supply of tokens you want to create.

  4. Customize additional parameters (optional):

    • Decimal Places: Decide the number of decimal places for your token.

    • Token Icon: You can upload a custom icon for your token.

  5. Review the information you provided and confirm the token creation.

  6. Once created, your WRC-20 token will be available on the WhiteBIT Network Testnet, and you can proceed to use it for testing purposes.

post image

Entering a random name, ticker, and coin quantity, you can check the desired checkboxes, and then click on "Open in Remix".

post image

On the left side, navigate to the third menu and click the button to compile our contract. If everything is fine, a green checkmark will appear to indicate successful compilation.

post image

Next, go to the section below, labeled "Deploy." In the "Environment" section, select "Injected Web3 Metamask" and connect your wallet to Remix.

Click the orange "Deploy" button, pay the transaction fee, and deploy your token.

post image

Copy the transaction hash from the bottom or simply enter our address into the explorer and click on the latest transaction. We need to copy the address of our token. It should appear in the "Token" menu under the account details.

post image
post image
post image

In the Metamask wallet, select the "Import Assets" button and paste the address of our token.

Great! Now you can also send this token to other wallets. You can repeat this process as many times as needed. Additionally, you can follow the same steps for creating and sending NFTs.

Creating an NFT and Verification.

Navigate to Remix:

Create New File

Name it mynfts.sol

paste this code and save :

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Counters.sol";

contract MyNFT is ERC721, ERC721URIStorage, Pausable, Ownable, ERC721Burnable {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIdCounter;

    constructor() ERC721("My NFT", "NFT") {}

    function pause() public onlyOwner {
        _pause();
    }

    function unpause() public onlyOwner {
        _unpause();
    }

    function safeMint(address to, string memory uri) public onlyOwner {
        uint256 tokenId = _tokenIdCounter.current();
        _tokenIdCounter.increment();
        _safeMint(to, tokenId);
        _setTokenURI(tokenId, uri);
    }

    function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize)
        internal
        whenNotPaused
        override
    {
        super._beforeTokenTransfer(from, to, tokenId, batchSize);
    }

    // The following functions are overrides required by Solidity.

    function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) {
        super._burn(tokenId);
    }

    function tokenURI(uint256 tokenId)
        public
        view
        override(ERC721, ERC721URIStorage)
        returns (string memory)
    {
        return super.tokenURI(tokenId);
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        override(ERC721, ERC721URIStorage)
        returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }
}

Click on the newly created file with the right mouse button, then click on "Flatten."

post image

In the document that was created, insert the phrase before the first line.

// SPDX-License-Identifier: MIT
post image

Next, click on our first file again, NOT Flatten. Proceed to compile it by selecting the compiler version 0.8.9 and compiling the file. A green checkmark will appear once it's done.

post image

Proceed to the deployment section and release the contract. Find the address of the created contract (Deployed Contract section).

post image

Navigate to :

https://explorer.whitebit.network/testnet/verify-contract

Go to the verification section in the explorer. Click on "More" and then "Contract Verification."

Paste our previously copied contract into the first field. Select "Solidity Single File" as the verification type. Choose the compiler version as 0.8.9 and select the MIT license.

post image

In the next window, you need to insert two lines:

  1. In the "Contract file name" field, paste the name of our file in Remix, including the .sol extension.

  2. In the "Solidity Contract Code" field, paste the complete code of the contract from the Flatten file. Specifically from the Flatten file, not the main contract. Then click on "Verify."

post image
post image

After verification, a green checkmark with the text "Success Verified" will appear.

Alright, now that we have the NFT contract ready, it's time to mint it.

  1. Click on the address of your NFT contract, then navigate to the "Contract" menu and select "Write Contract."

  2. Look for the "SafeMint..." block and open it.

  3. In this section, you need to insert the wallet address where the NFT will be sent, as well as the link to our image from NFTPort. So, let's proceed with creating the link.

post image

Got it! Here's the link to the image you provided:

https://img.freepik.com/premium-vector/premium-american-muscle-car-vector-isolated-white-background_289688-344.jpg

Now, let's proceed with creating the link for your NFT using this image.

  1. Follow the link:

  2. Fill in the "Name" and "Description" fields according to your preferences.

  3. In the "File_URL" field, paste the link to the image hosted on your preferred hosting platform.

  4. Click on "Try IT."

Underneath the "Try IT" button, a new window will appear. Copy the "metadata_uri" link from there, which should be in the format "ipfs://...". This is the link you need to paste in the second line, after your wallet address.

post image

Now, we'll sign by clicking the "Write" button.

Important: Your wallet must be connected to the explorer (you can connect it from the bottom right corner where we added the network to Metamask). Otherwise, the "Write" button will not be active.