> For the complete documentation index, see [llms.txt](https://docs.cytonic.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cytonic.com/network-documentation/cytonic-ethereum.md).

# Cytonic Ethereum

***

Cytonic Ethereum Testnet is a Layer 2 (L2) Ethereum Virtual Machine (EVM)-compatible blockchain designed for scalable, low-cost decentralized applications. This documentation provides essential details for developers to interact with the network.

Network Details

| Field               | Value                                                          |
| ------------------- | -------------------------------------------------------------- |
| **Network Name**    | Cytonic Ethereum Testnet                                       |
| **RPC URL**         | `https://rpc.evm.testnet.cytonic.com`                          |
| **Chain ID**        | `0xCC02` (52226 in decimal)                                    |
| **Block Explorer**  | `https://explorer.evm.testnet.cytonic.com`                     |
| **Currency Symbol** | ССС (test token)                                               |
| **Faucet**          | Contact the team or check official resources for testnet $ССС. |

### Connecting to the Network

1\. MetaMask Configuration

1. Open MetaMask and click the network dropdown.
2. Select **Add Network**.
3. Fill in the details:
   * **Network Name**: `Cytonic Ethereum Testnet`
   * **New RPC URL**: `https://rpc.evm.testnet.cytonic.com`
   * **Chain ID**: `52226` (or `0xCC02`)
   * **Currency Symbol**: `CCC`
   * **Block Explorer**: `https://explorer.evm.testnet.cytonic.com`

2\. Hardhat Configuration

Add the network to `hardhat.config.js`:

```javascript
module.exports = {
  networks: {
    cytonicTestnet: {
      url: "https://rpc.evm.testnet.cytonic.com",
      chainId: 52226,
      accounts: [process.env.PRIVATE_KEY]
    }
  }
};
```

3\. Foundry (Forge) Configuration

Add the RPC to `foundry.toml`:

```toml
[rpc_endpoints]
cytonicTestnet = "https://rpc.evm.testnet.cytonic.com"

[profile.default]
chain_id = 52226
```

***

### Example Contract Deployment

Simple Storage Contract

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

contract SimpleStorage {
    uint256 public value;

    function setValue(uint256 _value) external {
        value = _value;
    }
}
```

Deployment Script (Hardhat)

```javascript
async function main() {
  const Contract = await ethers.getContractFactory("SimpleStorage");
  const contract = await Contract.deploy();
  await contract.deployed();
  console.log("Deployed to:", contract.address);
}

main().catch((error) => {
  console.error(error);
  process.exitCode = 1;
});
```

Run with:

```bash
npx hardhat run scripts/deploy.js --network cytonicTestnet
```

***

### Interacting with the Blockchain

Using ethers.js

```javascript
const provider = new ethers.providers.JsonRpcProvider(
  "https://rpc.evm.testnet.cytonic.com"
);
const contract = new ethers.Contract(
  "0xYourContractAddress",
  ["function value() view returns (uint256)", "function setValue(uint256)"],
  provider
);

// Read value
const value = await contract.value();
console.log("Value:", value.toString());
```

***

### Troubleshooting

1. **Transaction Stuck?**\
   Ensure your gas fee is sufficient. Use the block explorer to check network congestion.
2. **Chain ID Mismatch**\
   Verify the Chain ID is `52226` (or `0xCC02`).
3. **RPC Connection Issues**\
   Double-check the RPC URL for typos. Test connectivity using tools like `curl`.

***

### Support

For assistance, join the Cytonic developer community:\
[Discord Support Server](https://discord.gg/cytonic)

***

**Note**: $CCC tokens on the testnet have no real-world value. Always use testnet funds for development purposes.
