A GRC-721 token on Gather Network is similar to an ERC-721 token on Ethereum.

This is a guide for creating your first GRC-721 (NFT) contract on Solidity with Open Zeppelin on Gather Testnet.

You can use the same guide to create a GRC-721 (NFT) contract on Gather Mainnet with mainnet configurations.


  1. MetaMask or any web3 wallet configured with Gather testnet.

  2. Testnet GTHs.

For this guide, we will be using remix as IDE and MetaMask as our wallet.


  1. Open Remix online compiler.

  2. In contracts create a new file token.sol and add the following code there.

    You can get the code from here as well -

    // SPDX-License-Identifier:MIT
    pragma solidity ^0.8.0;
    import "";
    import "";
    contract DemoNFT is Ownable, ERC721("Demo", "DNFT") {
        uint tokenId;
        mapping(address=>tokenMetaData[]) public ownershipRecord;
        struct tokenMetaData{
        uint tokenId;
        uint timeStamp;
        function mintToken(address recipient) onlyOwner public {
            require(owner()!=recipient, "Recipient cannot be the owner of the contract");
            _safeMint(msg.sender, tokenId);
            ownershipRecord[recipient].push(tokenMetaData(tokenId, block.timestamp));
            tokenId = tokenId + 1;
  3. Compile token.sol

  4. Switch to Gather Testnet Network in your MetaMask.

  5. In environments of Remix, select injected web3 and connect an account with enough testnet GTHs.

  6. Deploy your contract.

  7. This will open your MetaMask extension and ask you to confirm the pending transaction. Click the Confirm button on the MetaMask popup.

  8. You have successfully created and deployed a GRC-721 token contract on the Gather test network.

  9. You can now mint a GRC-721 token for any address on Gather testnet.


Last updated