Network Configuration
Citrate operates across multiple network environments, each serving a different stage of the development lifecycle. Our goal here is to give you a single reference for every endpoint and configuration you will need, regardless of which environment you are targeting.
Network Environments
| Parameter | Devnet | Testnet | Mainnet |
|---|---|---|---|
| Chain ID | 1337 | 1338 | TBD |
| RPC Port | 8545 | 18545 | TBD |
| RPC URL | http://localhost:8545 | https://testnet-rpc.cnidarian.cloud | TBD |
| WebSocket | ws://localhost:8546 | wss://testnet-ws.cnidarian.cloud | TBD |
| Currency | SALT | SALT | SALT |
| Block Time | ~1s | ~3s | TBD |
| Status | Local only | Public | Not yet launched |
Devnet (Local Development)
The Devnet is a local-only environment for rapid iteration. It runs a single-node Citrate instance on your machine with pre-funded accounts and instant block production.
Starting a Local Devnet
citrate-cli devnet start --port 8545
This launches a local node with 10 pre-funded accounts, each holding 10,000 SALT. The devnet resets on every restart unless you pass the --persist flag.
Devnet Configuration
{
"networkName": "Citrate Devnet",
"chainId": 1337,
"rpcUrl": "http://localhost:8545",
"wsUrl": "ws://localhost:8546",
"currencySymbol": "SALT",
"blockExplorer": null
}
Devnet is ideal for unit testing, contract debugging, and local integration tests. It supports all Citrate features including inference simulation through a mock model provider.
Testnet (Public Testing)
The Testnet is the public pre-production environment. It runs the full GhostDAG consensus with multiple validators and a live inference marketplace populated with test models.
Testnet Endpoints
- JSON-RPC:
https://testnet-rpc.cnidarian.cloud(port18545) - WebSocket:
wss://testnet-ws.cnidarian.cloud - Block Explorer: https://testnet-explorer.cnidarian.cloud
- Faucet: https://faucet.cnidarian.cloud
Testnet Faucet
The faucet distributes free testnet SALT for development and testing:
- Amount: 10 SALT per request
- Cooldown: 24 hours per address
- Rate limit: 100 requests per hour globally
- Web interface: https://faucet.cnidarian.cloud
You can also request tokens programmatically:
curl -X POST https://faucet.cnidarian.cloud/api/request -H "Content-Type: application/json" -d '{"address": "0xYOUR_WALLET_ADDRESS"}'
Testnet Configuration
{
"networkName": "Citrate Testnet",
"chainId": 1338,
"rpcUrl": "https://testnet-rpc.cnidarian.cloud",
"wsUrl": "wss://testnet-ws.cnidarian.cloud",
"currencySymbol": "SALT",
"blockExplorer": "https://testnet-explorer.cnidarian.cloud"
}
Mainnet
The Citrate Mainnet has not yet launched. Mainnet parameters (Chain ID, RPC endpoints, and genesis configuration) will be published here and announced through official Cnidarian Foundation channels prior to launch.
Hardhat Configuration
To add Citrate networks to your Hardhat project:
// hardhat.config.js
module.exports = {
networks: {
"citrate-devnet": {
url: "http://localhost:8545",
chainId: 1337,
accounts: [process.env.DEVNET_PRIVATE_KEY],
},
"citrate-testnet": {
url: "https://testnet-rpc.cnidarian.cloud",
chainId: 1338,
accounts: [process.env.TESTNET_PRIVATE_KEY],
},
},
};
Foundry Configuration
For Foundry users, add RPC aliases to your foundry.toml:
[rpc_endpoints]
citrate-devnet = "http://localhost:8545"
citrate-testnet = "https://testnet-rpc.cnidarian.cloud"
Then deploy with:
forge create --rpc-url citrate-testnet src/MyContract.sol:MyContract
Troubleshooting
If you cannot connect to the testnet RPC, we've found that the issue is almost always one of the following:
- Your firewall allows outbound HTTPS on port 443
- You are using the correct Chain ID (
1338for testnet,1337for devnet) - The RPC URL does not have a trailing slash
- Your wallet or tooling supports EIP-1559 transactions (Citrate uses EIP-1559 fee markets)