> For the complete documentation index, see [llms.txt](https://docs.kardiachain.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kardiachain.io/docs/archived-docs/tutorials/krc20-tokens/deploying-krc20-token.md).

# Deploying KRC20 Token

KardiaChain Official User Guide for Deploying KRC20 Token on Testnet and Mainnet

*Prerequisite*

* Connect your MetaMask wallet to KardiaChain mainnet or testnet. Detail instruction can be found [here](/docs/archived-docs/wallet/metamask-compatible.md).
* Have some KAI in your wallet to use as transaction fee

Deploying a new KRC20 token can be done by using [Remix](https://remix.ethereum.org/) and ERC20 contract from Open Zeppelin open source.

1. Open <https://remix.ethereum.org/>
2. Create new contract `KRC20.sol` and copy code from the following sample

```solidity
// contracts/GLDToken.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract MyToken is ERC20 {
    constructor(uint256 initialSupply) ERC20("My KRC20 Token", "MYTOKEN") {
        _mint(msg.sender, initialSupply);
    }
}
```

3\. Deploy contract

![Deploy KRC20 contract](https://3141795803-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MM9mQXVGUZV5VLWqxkT%2Fuploads%2FEHWEudrJW8Z2gtCMMzKK%2Fdeploy-krc20.png?alt=media\&token=b3ddf2e4-4b12-46ce-add8-1995c225c378)

![Deploy successfully](https://3141795803-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MM9mQXVGUZV5VLWqxkT%2Fuploads%2F7Fvu0gB2DKs41eTJqcME%2Fdeploy-success.png?alt=media\&token=fbfd045a-a63d-4e3a-9e20-898b8b5157d1)
