How to Create an XRC20 Token Using an XRC20 Factory Smart Contract

OVERVIEW

  • In this article we will show you how to make an XRC-20 token without doing any coding, and to verify this XRC-20 token on Block Explorer .

  • You will use a factory smart contract that is deployed in XDC MAINNET and TESTNET.

  • Smart contract address mainnet 'xdc5bf48D73498E7B7299749C466025af54CE98628b' testnet 'xdc3A339BA624D0A496C181714ca4a9148f106255D6' .

Follow these Steps :-

Making your own XRC20 Token

  1. Click on Write Contract

  2. Click on Connect to Web3 (If you do not installed XDCPay on your device check this)

  3. Next, click on DeployNewXRC20Token it will extend.

  1. Name of your token

  2. Symbol for your token

  3. Decimals, XRC20 uses a value of 18 for decimals

  4. InitalSupply, how many tokens you'd like to mint.

  • After clicking on "write", there will be a popup for transaction confirmation.

  • Congratulations, you've created your own XRC-20 token.

  • In next steps, you will verify your contract and also add it to XDCPay wallet.

  • Click on the transaction hash ID

Adding to XDCPay wallet

  • Next, click the token symbol

  • On this page, you can see all details related to your XRC-20 token. Please click on the smart contract address.

  • Copy the smart contract address to add it on our XDCPay wallet.

  • Now open your XDCPay wallet in a different tab.

  1. Click on Tokens.

  2. Click on Add Token.

  1. Paste your contract address in Token Address field.

  2. Click on Add.

  • You've now added your token in the XDCPay wallet.

Verify and Publish

  • Now you will verify your token. Go back to the previous tab and click on Verify and Publish.

  1. The contract address will be automatically filled in. If not, you'll have to paste your token contract address.

  2. Paste this 'XRC20Token' in Contract name.

  3. Set compiler to 0.8.5+

  4. Set Optimization to NO.

  5. Next, open this link in new tab and copy source code smart contract.

  1. Paste the copied code in this box.

  2. Next, click on submit.

Last updated