Cytonic Solana

Cytonic Solana Testnet is a Solana Virtual Machine (SVM)-compatible blockchain optimized for high-speed transactions and low fees. This documentation provides key details for developers to build and interact with the network.


Network Details

Field
Value

Network Name

Cytonic Solana Testnet

RPC URL

https://rpc.svm.testnet.cytonic.com/rpc

Block Explorer

https://explorer.svm.testnet.cytonic.com

Token Symbol

CCC (test token)

Faucet

Request testnet CCC tokens via the Cytonic faucet or CLI.


Connecting to the Network

1. Phantom Wallet Configuration

  1. Open Phantom Wallet and navigate to Settings > Networks.

  2. Click Add Network and enter:

    • Network Name: Cytonic Solana Testnet

    • RPC URL: https://rpc.svm.testnet.cytonic.com/rpc

    • Token: CCC

2. Solana CLI Configuration

Set the CLI to use Cytonic Solana Testnet:

solana config set --url https://rpc.svm.testnet.cytonic.com/rpc

3. Anchor Configuration

Update Anchor.toml for your project:

[provider]
cluster = "cytonic-svm-testnet"
wallet = "~/.config/solana/id.json"

[programs.localnet]
your_program = "YourProgramAddress"

[scripts]
test = "yarn run test"

Example Program Deployment

Simple Counter Program (Rust)

use anchor_lang::prelude::*;

declare_id!("YourProgramID");

#[program]
pub mod counter {
    use super::*;

    pub fn initialize(ctx: Context<Initialize>) -> Result<()> {
        let counter = &mut ctx.accounts.counter;
        counter.count = 0;
        Ok(())
    }

    pub fn increment(ctx: Context<Increment>) -> Result<()> {
        let counter = &mut ctx.accounts.counter;
        counter.count += 1;
        Ok(())
    }
}

#[derive(Accounts)]
pub struct Initialize<'info> {
    #[account(init, payer = user, space = 8 + 8)]
    pub counter: Account<'info, Counter>,
    #[account(mut)]
    pub user: Signer<'info>,
    pub system_program: Program<'info, System>,
}

#[derive(Accounts)]
pub struct Increment<'info> {
    #[account(mut)]
    pub counter: Account<'info, Counter>,
}

#[account]
pub struct Counter {
    pub count: u64,
}

Deploy with Solana CLI

# Build and deploy
anchor build
anchor deploy --provider.cluster https://rpc.svm.testnet.cytonic.com/rpc

Interacting with the Blockchain

Using @solana/web3.js

import { Connection, PublicKey, clusterApiUrl } from "@solana/web3.js";

const connection = new Connection("https://rpc.svm.testnet.cytonic.com/rpc");
const programId = new PublicKey("YourProgramID");

// Fetch account data
const counterAccount = new PublicKey("CounterAccountAddress");
const accountInfo = await connection.getAccountInfo(counterAccount);
console.log("Counter value:", accountInfo.data.readUInt64LE(0));

Troubleshooting

  1. RPC Timeouts Check your internet connection or switch to the WebSocket URL for real-time updates.

  2. Transaction Not Confirmed Use the Solana CLI to check status:

    solana confirm -v <TRANSACTION_SIGNATURE>
  3. Program ID Mismatch Ensure the program ID matches the deployed address on the Cytonic block explorer.


Support

Join the Cytonic developer community for assistance: Discord Server


Note: $CCC tokens on the testnet have no monetary value. Use them only for development and testing.

Last updated