# 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:

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

3\. Anchor Configuration

Update `Anchor.toml` for your project:

```toml
[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)

```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

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

***

### Interacting with the Blockchain

Using @solana/web3.js

```javascript
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:

   ```bash
   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](https://discord.gg/cytonic)

***

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


---

# 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://docs.cytonic.com/network-documentation/cytonic-solana.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.
