top of page

Create Your Own NFT on R0ARchain
 

nft-symbol_2x.png
r0ar-1.jpg
r0ar-background-20.jpg

Prerequisites

Follow the two steps below before starting your R0AR NFT minting process:

  1. MetaMask Installed & Connected to R0ARchain.

  2. Test ETH (if using Testnet) from testnet.r0arfaucet.io.

Step 01

Launch Remix IDE

Remix IDE is an online development environment for creating and deploying smart contracts, and it is fully compatible with R0ARchain.

  1. Go to the Remix IDE website.

  2. Click on the File Explorer icon and create a new file named MyNFT.sol.

Step 02

Copy Solidity code into SimpleStorage.sol file

Copy and paste the following ERC-721 NFT contract:

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

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract MyNFT is ERC721URIStorage, Ownable {
    uint256 private _tokenIds;

    constructor() ERC721("MyNFT", "MNFT") {}

    function mintNFT(address recipient, string memory tokenURI) public onlyOwner returns (uint256) {
        _tokenIds++;
        uint256 newItemId = _tokenIds;
        _mint(recipient, newItemId);
        _setTokenURI(newItemId, tokenURI);
        return newItemId;
    }
}

Step 03

Compile the NFT token Contract

The next step is compiling the ERC-721 contract with the following steps:

  1. Click the Solidity Compiler tab.

  2. Select Compiler Version 0.8.x.

  3. Click Compile MyNFT.sol.

Step 04

Deploy on R0ARchain

The ERC-721 token can now be deployed on the R0ARchain with these steps:


  1. Go to Deploy & Run Transactions.

  2. Under Environment, select Injected Provider - MetaMask. 

  3. Choose R0AR Chain or R0AR Testnet in MetaMask. 

  4. Click Deploy and approve the transaction in MetaMask.

Step 05

 Mint an NFT

The NFT is now ready to be minted:


  1. Under Deployed Contracts, expand your NFT contract. 

  2. Find mintNFT() and enter the recipient Address (your MetaMask address). 

  3. Token URI (a link to an NFT image, e.g., https://ipfs.io/ipfs/YOUR_HASH). 

  4. Click Transact and approve the transaction in MetaMask.

Step 06

View Your NFT

Check your R0ARchain NFT: 

  1. Copy the contract address from Remix. 

  2. Use r0arscan.io or testnet.r0arscan.io to check your NFT. 

  3. To view it in MetaMask, go to NFTs, Iimport NFT, and enter your contract address & Token ID.

Your NFT is now live on R0AR. Welcome to the future of NFT creation and trading.

Next Steps for Developers

Developers might be interested in following up the NFT mint with these steps:

  • Deploy on Mainnet: Use the R0AR Mainnet to mint real NFTs.

  • Bridge Tokens: Transfer ETH and R0AR tokens between Ethereum and R0ARchain.

  • List NFTs on Marketplaces: Integrate your NFTs with OpenSea or other marketplaces.

  • Smart Contract Development: Expand your NFT's functionality with features like crypto staking rewards, royalties, or DAO integration.

Finally, developers looking to interact with a community of leading builders and traders should join the R0AR DeFi community.

FAQs

  • ERC-721 is a technical standard for creating non-fungible tokens (NFTs) on the Ethereum blockchain. Unlike ERC-20 tokens, each ERC-721 token is unique and indivisible, making them ideal for representing ownership of digital collectibles and other one-of-a-kind assets.

  • A token URI (Uniform Resource Identifier) is a link that points to the metadata associated with an NFT. This metadata typically includes information such as the NFT's name, description, image, and other relevant attributes.

bottom of page