Deploy Smart Contracts on XDC Network

A step-by-step guide to deploying smart contracts on XDC Testnet (Apothem) through XDC Remix and XDCPay.

Stage 1: Setup the Environment

  • After selecting the environment according to your contract, create a new file and name it.

  • Paste your contract in the new file you have created and select the compiler version as per your contract.

  • Now, click on the compiler to compile your contract.

Stage 2: Add XDCPay to Chrome/Brave browser

  • XDCPay is an extension to your Google Chrome/Brave browser.

  • Download XDCPay and fund it with XDC to deploy your contract.

  • After compiling your contract, you need to deploy it.

  • After accepting all the terms and conditions, enter a strong password and remember it. Whenever you access XDCPay, you need to enter the password.

  • A seed will appear and this can be used access your wallet. Make sure you create a backup of your Keystore file.

  • Select the XDC Apothem network to get the test token from the XDC Faucet.

Stage 3: Deploy the Contract

  • After getting the test token on XDCPay, deploy the token from XDC Remix and submit the required transaction.

  • If you want to deploy a smart contract on the XDC mainnet, you will need to change the network on XDCPay and follow the same steps. NOTE: To deploy smart contracts on the XDC mainnet, users must obtain XDC via an exchange, decentralized exchange, or swap platform.

  • After the deployment of the contract, you can check the transaction hash on XDCPay. Once the contract has been successfully deployed, you can check the status on XDC Scan as well.

Stage 4: Interact With Contracts

You can also interact with your smart contract on XDC Remix.

Last updated