# Deploying KRC20 Token

*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](/files/wTfpvPtF59HsyuQ3v8cG)

![Deploy successfully](/files/RNNo2WwmHaufhBUuQqlu)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kardiachain.io/docs/archived-docs/tutorials/krc20-tokens/deploying-krc20-token.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
