Cobotium Documentation

Introduction

Cobotium is a custom token platform built on the Solana blockchain. It provides a secure, efficient, and feature-rich token program that allows for:

  • Creating token mints with configurable decimals
  • Minting tokens to accounts
  • Transferring tokens between accounts
  • Burning tokens
  • Freezing and thawing accounts for security purposes

Getting Started

Prerequisites

  • Rust and Cargo
  • Solana CLI tools (v1.17.0 or later)
  • A Solana wallet with SOL for transactions

Installation

git clone https://github.com/arodrig125/Cobotium-cli.git
cd Cobotium-cli
cargo build --release

Token Program

The Cobotium Token Program is a Solana program that implements token functionality. It supports the following operations:

  • Initialize Mint: Creates a new token mint with specified decimals and optional freeze authority.
  • Initialize Account: Creates a new token account associated with a specific mint.
  • Mint To: Mints new tokens to a specified account.
  • Transfer: Transfers tokens from one account to another.
  • Burn: Burns (destroys) tokens from an account.
  • Freeze Account: Freezes an account, preventing any token operations until thawed.
  • Thaw Account: Thaws a frozen account, allowing token operations again.

SDK

The Cobotium SDK provides a convenient way to interact with the Cobotium Token Program from Rust applications.

Usage Example

use cobotium_sdk::CobotiumClient;
use solana_sdk::signature::{Keypair, Signer};

// Create a client
let client = CobotiumClient::new("https://api.devnet.solana.com", "YOUR_PROGRAM_ID")?;

// Initialize a mint
let payer = Keypair::from_file("path/to/keypair.json")?;
let mint = Keypair::new();
let decimals = 9;
let freeze_authority = Some(&payer.pubkey());

client.initialize_mint(&payer, &mint, &payer.pubkey(), freeze_authority, decimals)?;

// Create an account
let account = Keypair::new();
client.initialize_account(&payer, &account, &mint.pubkey(), &payer.pubkey())?;

// Mint tokens
let amount = 1000000000; // 1 token with 9 decimals
client.mint_to(&payer, &mint.pubkey(), &account.pubkey(), &payer, amount)?;

CLI

The Cobotium CLI provides a command-line interface for interacting with the Cobotium Token Program.

Commands

Create a Mint

cobotium-cli --program-id <PROGRAM_ID> create-mint --mint-keypair <KEYPAIR_PATH> --decimals 9 --freeze-authority <FREEZE_AUTH_KEYPAIR_PATH>

Create an Account

cobotium-cli --program-id <PROGRAM_ID> create-account --account-keypair <KEYPAIR_PATH> --mint <MINT_ADDRESS> --owner <OWNER_ADDRESS>

Mint Tokens

cobotium-cli --program-id <PROGRAM_ID> mint-tokens --mint <MINT_ADDRESS> --account <ACCOUNT_ADDRESS> --mint-authority <AUTHORITY_KEYPAIR> --amount <AMOUNT>

Security Features

The Cobotium Token Program includes several security features:

  • Freeze Authority: A special role that can freeze and thaw accounts.
  • Overflow Protection: All arithmetic operations are checked for overflow/underflow.
  • Ownership Verification: The program verifies ownership of accounts.
  • Initialization Checks: The program prevents re-initialization of accounts.

Deployment Guide

For detailed deployment instructions, see our Mainnet Deployment Guide.

Monitoring

For detailed monitoring setup instructions, see our Monitoring Guide.

Troubleshooting

Common Errors

  • "Invalid Program ID": Ensure you're using the correct program ID in your commands.
  • "Insufficient Funds": Ensure the account has enough tokens for the operation.
  • "Account Already Initialized": The account you're trying to initialize already exists.
  • "Account Frozen": The account is frozen and cannot perform token operations until thawed.