Skip to main content
Glama

Aptos Blockchain MCP

COIN_DEPLOYMENT_GUIDE.md5.81 kB
# 🪙 Custom Coin Deployment Guide This guide shows you how to create, deploy, and manage your own custom tokens on Aptos using the new coin deployment tools. ## 📋 Overview The Aptos MCP server now includes powerful tools for complete coin lifecycle management: - **`deploy_coin`** - Create new custom tokens - **`mint_coin`** - Mint tokens (deployer only) - **`register_coin`** - Register to receive custom coins - **`get_coin_balance`** - Check custom coin balances - **`transfer_coin`** - Transfer custom coins ## 🚀 Step-by-Step Workflow ### Step 1: Deploy Your Custom Coin Create a new token with your desired properties: ```json { "tool": "deploy_coin", "parameters": { "name": "My Awesome Token", "symbol": "MAT", "decimals": 8, "icon_url": "https://example.com/token-icon.png", "project_url": "https://myproject.com" } } ``` **Result:** You'll get a coin type identifier like `0x123abc...::coin::T` ### Step 2: Register Recipients (If Needed) Before others can receive your token, they need to register: ```json { "tool": "register_coin", "parameters": { "coin_type": "0x123abc...::coin::T" } } ``` **Note:** The deployer is automatically registered and can receive the tokens. ### Step 3: Mint Your Tokens Create new tokens and send them to recipients: ```json { "tool": "mint_coin", "parameters": { "coin_type": "0x123abc...::coin::T", "recipient_address": "0x456def...", "amount": "1000000000" } } ``` **Note:** Amount is in the coin's base unit (considering decimals). ### Step 4: Check Balances Verify the tokens were minted and received: ```json { "tool": "get_coin_balance", "parameters": { "account_address": "0x456def...", "coin_type": "0x123abc...::coin::T" } } ``` ### Step 5: Transfer Tokens Recipients can now transfer tokens to others: ```json { "tool": "transfer_coin", "parameters": { "recipient_address": "0x789ghi...", "coin_type": "0x123abc...::coin::T", "amount": "100000000" } } ``` ## 💡 Best Practices ### Token Design - **Choose meaningful names and symbols** that represent your project - **Use standard decimal places**: 6-8 decimals are common - **Provide icon and project URLs** for better user experience - **Plan your tokenomics** before deployment ### Security Considerations - **Only the deployer can mint** new tokens - **Keep your private key secure** - it controls the entire token supply - **Test on testnet first** before mainnet deployment - **Consider total supply limits** in your application logic ### User Experience - **Recipients must register** before receiving custom coins - **Provide clear instructions** for registration - **Use descriptive transaction messages** when possible - **Monitor gas costs** for your users ## 🔧 Technical Details ### Coin Type Format Custom coins follow this format: `{deployer_address}::coin::T` Example: `0x742d35Cc6634C0532925a3b8D6Ac0C4db9c8b3::coin::T` ### Decimal Handling - **Decimals**: Number of decimal places (0-32) - **Base Unit**: Smallest transferable unit - **Display Unit**: Human-readable amount Example with 8 decimals: - Base unit: `100000000` (1 followed by 8 zeros) - Display unit: `1.00000000` (1 token) ### Gas Costs - **Deploy**: ~5,000 gas units - **Register**: ~1,000 gas units - **Mint**: ~3,000 gas units - **Transfer**: ~2,000 gas units ## 🎯 Use Cases ### DeFi Projects - Create governance tokens - Implement reward tokens - Build liquidity pool tokens ### Gaming - In-game currency - Achievement tokens - NFT-backed tokens ### DAOs - Voting tokens - Membership tokens - Utility tokens ### Businesses - Loyalty points - Gift cards - Internal credits ## ⚠️ Important Notes ### Permissions - **Only the deployer** can mint new tokens - **Anyone can transfer** tokens they own - **Registration is required** to receive custom coins ### Network Considerations - **Testnet**: Free testing environment - **Mainnet**: Real value, real costs - **Always test thoroughly** on testnet first ### Limitations - **No built-in burning** mechanism in basic managed coins - **No supply cap** enforcement (must be handled in application logic) - **Deployer has unlimited minting** power ## 🔍 Troubleshooting ### Common Issues **"Account not registered for coin type"** - Solution: Use `register_coin` tool first **"Only deployer can mint"** - Solution: Use the same account that deployed the coin **"Insufficient balance"** - Solution: Check APT balance for gas fees **"Invalid coin type format"** - Solution: Use format `0xADDRESS::module::Type` ### Getting Help - Check transaction status with `get_transaction_status` - Verify account info with `get_account_info` - Monitor balances with `get_coin_balance` ## 📚 Example Scenarios ### Scenario 1: Gaming Token ``` 1. Deploy: "GameCoin" (GC) with 6 decimals 2. Mint: 1,000,000 tokens to game treasury 3. Players register for GameCoin 4. Reward players with tokens for achievements 5. Players trade tokens with each other ``` ### Scenario 2: DAO Governance ``` 1. Deploy: "VoteToken" (VOTE) with 0 decimals 2. Mint: 1 token per member to their address 3. Use tokens for governance voting 4. Transfer tokens when membership changes ``` ### Scenario 3: Loyalty Program ``` 1. Deploy: "LoyaltyPoints" (LP) with 2 decimals 2. Customers register for loyalty points 3. Mint points for purchases and activities 4. Customers redeem points for rewards ``` ## 🎉 Conclusion The Aptos MCP server now provides complete custom token functionality, enabling you to: - ✅ Create unique tokens for any use case - ✅ Control token supply through minting - ✅ Manage token distribution and transfers - ✅ Build token-based applications and economies Start building your token economy on Aptos today! 🚀

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/punkpeye/aptos-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server