Launch Your Own Token With Remix
MetaMask is required for this tutorial. Set up MetaMask if you haven't already.
Deploy an ERC20 Smart Contract Using Remix
Getting TLOS for Testnet
If you haven't already, visit the Testnet Faucet to acquire Testnet TLOS.
Create Smart Contract
-
Open Remix
-
Load or create the smart contracts you want to compile and deploy using Remix file explorer. Click the contracts tab and create a file named MyEpicToken.sol.
-
For this example, we will deploy this ERC20 contract from Open Zeppelin
-
Copy and Paste the smart contract from Open Zeppelin under the contracts folder into MyEpicToken.sol file.
Connect MetaMask and Compile Smart Contract
- Click on Ethereum Deploy Logo on the side, then change the environment to Injected Web3 to integrate Telos Testnet through MetaMask
-
On the MetaMask pop-up, follow the prompts and allow the wallet to connect to Remix.
-
The next step is to compile the contract into byte code so the Telos EVM can read the state changes being made from our Solidity program. Note the compile version at the top. Always match it to the compiler version listed in your program Pragma. Once complete, the byte code will be ready to compile.
Deploy Smart Contract
- Click on the contract you have created called GLD Token that inherits the ERC20 standards
- Under Deploy, enter the initial supply that will be passed to the constructor. Note that the ERC20 standard uses 18 decimal places by default. Meaning if you wanted a supply of 100 GLD Tokens, you would input 100000000000000000000.
- Press Deploy and approve the transaction
Call data from the blockchain to test view methods from ERC20 contract inherited. View the contract address where ERC20 is located.
You can now go to Open Zeppelin and other Open Source sites to copy and paste contracts and easily interact with them on the Telos blockchain Network.