RPC Optimization
Avoid Unnecessary Calls
Some values are static or change infrequently on c8ntinuum. Consider hardcoding:Batch Calls
Use Multicall3 (pre-deployed at0xcA11bde05977b3631167028862bE2a173976CA11) to aggregate multiple read calls into a single RPC request:
Use JSON-RPC Batching Carefully
The documented EVM JSON-RPC batch limit is2000 requests, with a maximum batch response size of 50000000 bytes. Keep batches well below those limits and make them retryable. In ethers v6, JsonRpcProvider sends concurrent requests as one JSON-RPC batch (tune it with the batchMaxCount and batchStallTime provider options):
jsonrpc: "2.0" and a unique id.
Gas Optimization
- Use
eth_estimateGasfor complex transactions - A plain CTM transfer (no calldata) to an address that has no code, is not a precompile, and has no EIP-7702 delegation uses exactly
21000gas. For contracts, precompiles, smart-contract wallets, or delegated EOAs, useeth_estimateGas - Keep
gasLimitclose to the estimate: every EVM transaction is charged at least 50% of its gas limit. See Gas - Set reasonable
maxFeePerGas— read the base fee from the latest block’sbaseFeePerGas(oreth_feeHistory) and the tip frometh_maxPriorityFeePerGas, then use about2 × baseFeePerGas + tip(the ethers v6getFeeData()heuristic).eth_gasPricereturns the base fee plus the suggested tip, not the base fee alone
Nonce Management
For applications submitting multiple transactions in rapid succession:- Track nonces locally rather than querying
eth_getTransactionCountfor each tx - Submit transactions concurrently with incrementing nonces
- Handle nonce gaps — c8ntinuum supports nonce gap queuing, but sequential submission is more reliable
Indexing
For historical data queries, use an indexer rather than RPC:- On-chain event logs are available via
eth_getLogs; keep each request within the10000block and10000log caps - For complex queries (token transfers, DEX trades, balances over time), use a dedicated indexer
- See Indexers for SubQuery/The Graph guidance and current provider status
Smart Contract Best Practices
- Use OpenZeppelin contracts for standard patterns
- When interacting with c8ntinuum precompiles, pass amounts in base
ctmunits (18 decimals, the same scale as wei). See Tokens - Test on a local node before deploying to mainnet — run
./local_node.shfrom a checkout of the c8ntinuum node source for a local instance. The node source will be published in a public GitHub repository (repository TBA). See Local Development