Token Minter
Last updated
Last updated
This guide provides a comprehensive walkthrough for deploying an ERC-20 token on the KiteAI Testnet. It covers two primary methods:
Remix IDE: A beginner-friendly, browser-based approach.
Foundry: A command-line toolchain suitable for advanced users.
Before diving into the deployment steps, it's essential to understand the KiteAI network and the significance of deploying on this platform.
KiteAI is an EVM-compatible L1 blockchain designed to empower decentralized AI economies using, powered by Proof of AI (PoAI). This innovative consensus mechanism that ensures fair attribution and transparent rewards for contributors across agents, models, and data.
Chain ID: 2368 (0x940)
Native Currency: KITE
Block Gas Limit: 400,000,000
Testnet Faucet:
Network Addition:
Deploying on the KiteAI network allows developers to:
Test and validate smart contracts in an AI-enhanced environment.
Participate in a forward-thinking ecosystem that combines blockchain and AI technologies.
Create an ERC-20 token smart contract using OpenZeppelin's standard implementation.
Deploy the contract to the KiteAI Testnet using:
Remix IDE (beginner-friendly)
Foundry (advanced CLI tool)
A Web3 wallet (e.g., MetaMask)
Basic knowledge of Solidity and smart contract development.
An ERC-20 token is a standardized smart contract on Ethereum and EVM-compatible blockchains that defines a set of rules for fungible tokens. These rules include how tokens are transferred, how users can access data about a token, and the total supply of tokens.
totalSupply(): Returns the total token supply.
balanceOf(address): Returns the account balance of another account with address address.
transfer(address, uint256): Transfers amount of tokens to address recipient.
approve(address, uint256): Allows spender to withdraw from your account multiple times, up to the amount.
transferFrom(address, address, uint256): Transfers amount tokens from address sender to address recipient.
allowance(address, address): Returns the amount which spender is still allowed to withdraw from the owner.
Connect your MetaMask wallet.
Add the KiteAI Testnet to your networks.
Connect your MetaMask wallet.
Request 0.5 Kite tokens.
Create a new file named ”MyToken.sol”.
Paste the following code:
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract MyToken is ERC20 { constructor(uint256 initialSupply) ERC20("MyToken", "MTK") { _mint(msg.sender, initialSupply); } }
This contract uses OpenZeppelin's ERC-20 implementation to create a token named "MyToken" with the symbol "MTK".
Navigate to the "Solidity Compiler" tab in Remix.
Ensure the compiler version is set to 0.8.20 or higher.
Click "Compile MyToken.sol".
Go to the "Deploy & Run Transactions" tab.
Set the environment to "Injected Provider - MetaMask".
Ensure MetaMask is connected to the KiteAI Testnet.
Enter the initial supply (e.g., 1000000 for 1 million tokens).
Click "Deploy".
Confirm the transaction in MetaMask.
Once deployed, your ERC-20 token will be live on the KiteAI Testnet.
If you haven't installed Foundry:
curl -L https://foundry.paradigm.xyz | bash foundryup
forge init MyTokenProject cd MyTokenProject
forge install OpenZeppelin/openzeppelin-contracts
In foundry.toml, add:
[profile.default] remappings = ["@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/"]
Create a new file at src/MyToken.sol:
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; contract MyToken is ERC20 { constructor(uint256 initialSupply) ERC20("MyToken", "MTK") { _mint(msg.sender, initialSupply); } }
Create a new file at script/Deploy.s.sol:
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "forge-std/Script.sol"; import "../src/MyToken.sol"; contract DeployScript is Script { function run() external { vm.startBroadcast(); new MyToken(1000000 * 10 ** 18); vm.stopBroadcast(); } }
Create a .env file in the root directory:
PRIVATE_KEY=your_private_key RPC_URL=https://rpc-testnet.gokite.ai
Replace your_private_key with your wallet's private key that holds Kite tokens.
source .env forge build forge script script/Deploy.s.sol:DeployScript --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast
After deployment, Foundry will provide the contract address and transaction details.
Deploying an ERC-20 token on the KiteAI Testnet is straightforward using either Remix IDE or Foundry. By following this guide, developers can:
Understand the KiteAI network and its unique features.
Write and deploy ERC-20 tokens efficiently.
Choose the deployment method that best suits their experience level.
For further exploration, consider integrating additional functionalities into your token, such as minting, burning, or pausing transfers, using OpenZeppelin's extensive library of smart contract modules.
Test Kite tokens (claim from )
Access to the KiteAI Testnet via MetaMask. (via )
Visit .
Visit the .
Open .