Links

Using Remix IDE

Setting up and launching a DRC20 Token Smart Contract on the Deelance Testnet using Remix IDE.

What is Remix IDE ?

Remix IDE is an open-source web and desktop application that aids in smart contract development, written in Solidity language for the Ethereum blockchain. It provides a range of tools that help developers write, test, debug, and deploy smart contracts with ease. Some notable features of Remix IDE include.

Prerequisites

  1. 1.
    Add Deelance Testnet in your MetaMask, to add refer to our guide Add DeeLance to Metamask
  2. 2.
    Get Deelance Testnet coins from the Deelance Faucet.

Creating and Deploying DRC20 Token on Remix IDE

you'll be greeted with the following screen.
  • Click on the icon mentioned below to generate a new file called PepeDeelance.sol.
An empty file will appear as shown below.
  • Copy the following code and insert it into PepeDeelance.sol.
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
contract PepeDeelance is ERC20, Ownable {
constructor() ERC20("PepeDeelance", "PEPEDLANCE") {
_mint(msg.sender, 1000000000 * 10 ** decimals());
}
function mint(address to, uint256 amount) public onlyOwner {
_mint(to, amount);
}
}
  • Now, click on the specified icon to compile your contract.
  • Next, press the "Compile" button to compile your contract, ensuring you select the checkbox highlighted within the blue circle.
  • To deploy your contract, click on the indicated button below.
  • Now, select the "Remix VM...." dropdown, and then choose the "Injected Provider" highlighted in orange.
After making that selection, MetaMask will prompt you to unlock your wallet. If you're already logged into MetaMask, you'll see a display similar to the one below.
Ensure that you're connected to the DLANCE TESTNET, which carries a chain ID of 455214.
  • To finalize the deployment of your DRC20 Smart Contract on the Deelance Testnet, press the "Deploy" button highlighted in orange, as shown below.
Ensure you have enough Deelance Testnet Tokens to cover the gas fees for the transaction. If you need Testnet Deelance tokens, visit the Deelance Faucet.
If you haven't added the Deelance Testnet in your MetaMask, refer to our guide Add DeeLance to Metamask
After clicking the "Deploy" button, MetaMask will pop up prompting you to approve the transaction. Once you confirm, your contract will deploy within a few seconds, and you'll be able to view your deployed contract here.
Well done! You've successfully created and launched the DRC20 token on the Deelance Testnet.