# Token Creation

This section defines the complete process for creating, compiling, deploying, and verifying tokens on the ClubMOS Blockchain using CRC (ClubMOS Request Command) standards.

ClubMOS operates as an EVM-compatible Layer-1 network, enabling seamless deployment of Solidity smart contracts with deterministic execution and low transaction costs.

***

## 1. CRC Token Standards Overview

CRC (ClubMOS Request Command) formalizes token behavior specifications within the ClubMOS ecosystem.

Supported Standards:

#### CRC-20

Fungible token standard\
Use cases:

* Payments
* Utility tokens
* Governance tokens
* DeFi assets
* Stable assets

***

#### CRC-721

Non-Fungible Token (NFT) standard\
Use cases:

* Digital art
* Game assets
* Identity tokens
* Collectibles

***

#### CRC-1155

Multi-token standard\
Supports:

* Fungible + Non-fungible tokens in one contract
* Gas-efficient batch minting
* Gaming economies

***

#### CRC-1400 / CRC-1401

Enterprise & regulated asset standards\
Features:

* Partitioned balances
* Compliance hooks
* Transfer restrictions
* Regulated asset frameworks

All CRC standards are EVM-compatible and follow deterministic execution rules.

***

## 2. Network Configuration Requirements

Before deploying any contract, ensure proper network configuration.

### ClubMOS Mainnet (Chain ID 2255)

| Parameter       | Value                      |
| --------------- | -------------------------- |
| Network Name    | ClubMOS                    |
| Chain ID        | 2255                       |
| Native Currency | CMX                        |
| HTTP RPC        | <https://rpc.mosscan.com>  |
| WebSocket RPC   | wss\://mainnet.mosscan.com |
| Virtual Machine | CVM (EVM-Compatible)       |
| Block Explorer  | <https://mosscan.com>      |

***

### Execution Environment Characteristics

* Average block time: \~2 seconds
* Deterministic finality
* Low gas volatility
* EVM opcode compatibility
* Solidity compiler compatibility (0.8.x recommended)

***

## 3. Development Environment Setup

### Step 1: Install MetaMask

Download from:\
<https://metamask.io>

MetaMask will:

* Store your private keys locally
* Sign transactions
* Broadcast deployments to ClubMOS

Secure your Secret Recovery Phrase offline.

***

### Step 2: Add ClubMOS Network to MetaMask

Open MetaMask → Add Network → Add Manually

Enter:

Network Name: ClubMOS\
Chain ID: 2255\
Currency Symbol: CMX\
RPC URL: <https://rpc.mosscan.com>

Save and switch to ClubMOS.

Verify that Chain ID = 2255 before deploying.

***

## 4. Smart Contract Development

### Step 3: Open Remix IDE

Visit:\
<https://remix.ethereum.org>

Remix supports:

* Solidity compilation
* ABI generation
* Direct deployment via MetaMask
* On-chain testing

***

### Step 4: Create Solidity File

Create a new file:

Example:\
MyCRCToken.sol

***

## 5. Contract Implementation Guidelines

CRC contracts must follow:

* Deterministic supply logic
* Standardized event emission
* No hidden mint backdoors
* Transparent ownership logic
* Safe math (Solidity ≥0.8 handles overflow checks)

***

### Example: CRC-20 Token Skeleton

```
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

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

contract MyCRCToken is ERC20 {
    constructor(uint256 initialSupply) ERC20("My CRC Token", "MCT") {
        _mint(msg.sender, initialSupply);
    }
}
```

Key Requirements:

* totalSupply must reflect actual minted tokens
* transfer and transferFrom must emit Transfer events
* Optional burn() must reduce totalSupply

***

## 6. Compilation

Open Solidity Compiler tab.

Recommended compiler version:\
0.8.20

Click:\
Compile MyCRCToken.sol

Ensure:

* No warnings
* No overflow issues
* No deprecated opcodes

***

## 7. Deployment Process

Open Deploy & Run Transactions tab.

Under Environment:

Select:\
Injected Provider – MetaMask

Confirm:

* Network = ClubMOS
* Chain ID = 2255
* Account has sufficient CMX for gas

Click Deploy.

***

## 8. Transaction Confirmation

MetaMask will display:

* Gas estimate
* Gas price
* Total fee in CMX

ClubMOS gas fees are:

* Predictable
* Low
* Deterministic

Click Confirm.

***

## 9. Contract Address & State

Once confirmed:

* Contract address is generated
* Deployment transaction hash is recorded
* State initialized at block height

Record the contract address carefully.

***

## 10. Contract Verification on MOS Scan

Visit:\
<https://mosscan.com>

Search your contract address.

Select:\
Verify & Publish

Upload:

* Solidity source code
* Compiler version
* Optimization settings

Verification ensures:

* Public transparency
* Trust
* Source-code auditability

***

## 11. Post-Deployment Integration

After successful deployment:

You may:

* Add token to MetaMask manually
* Provide liquidity on SwapMOS
* Integrate with DEX routers
* Enable staking contracts
* Bridge token cross-chain
* Integrate into governance modules

***

## 12. Gas & Execution Model

Each deployment transaction consumes:

Gas = Base deployment cost + Bytecode size cost + Storage initialization cost

ClubMOS CVM ensures:

* Predictable gas accounting
* No hidden opcode inflation
* Efficient storage writes

Batch operations (CRC-1155) significantly reduce per-token gas cost.

***

## 13. Security Best Practices

Before production deployment:

* Audit contract logic
* Test on Testnet (Chain ID 1155)
* Avoid unbounded loops
* Implement Ownable or AccessControl patterns
* Protect mint functions
* Validate constructor parameters
* Verify contract on MOS Scan

Never expose:

* Private keys
* Seed phrases
* Deployment wallet credentials

***

## 14. Advanced Developer Options

You may also deploy using:

#### Hardhat

Configure network:

```
networks: {
  clubmos: {
    url: "https://rpc.mosscan.com",
    chainId: 2255,
    accounts: [PRIVATE_KEY]
  }
}
```

#### Foundry

```
forge create --rpc-url https://rpc.mosscan.com \
--private-key YOUR_PRIVATE_KEY \
src/MyCRCToken.sol:MyCRCToken
```

***

## 15. Deterministic Execution Guarantee

All CRC deployments follow:

Contract Address=keccak256(rlp(sender,nonce))Contract\ Address = keccak256(rlp(sender, nonce))Contract Address=keccak256(rlp(sender,nonce))

Ensuring predictable contract address derivation.

State transitions follow:

St+1=f(St,Input)S\_{t+1} = f(S\_t, Input)St+1​=f(St​,Input)

All contract logic must be:

* Reproducible
* Verifiable
* Consensus-validatable

***

## 16. Summary

Token creation on ClubMOS:

* Fully EVM-compatible
* Deterministic
* Fast (\~2 sec finality)
* Low-cost
* CRC-standard compliant
* Multichain-ready

Chain ID 2255 enables scalable token creation across:

* DeFi
* NFTs
* Gaming
* Enterprise
* Governance
* Cross-chain ecosystems

ClubMOS provides infrastructure-grade token deployment without complexity overhead.


---

# 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://clubmos.gitbook.io/clubmos-docs/developers/token-creation.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.
