celo-rpc
Skill8 starsChanged 2 months agoApache-2.0View on GitHub
Interact with Celo blockchain via RPC endpoints. Use when reading balances, transactions, blocks, and interacting with Celo via viem or cast.
- Reads credentials
- Installs packages
- Sends data out
In this repository15 other files it gives its agents.
- 8004Skill
- bridgingSkill
- celo-composerSkill
- celo-defiSkill
- celo-stablecoinsSkill
- contract-verificationSkill
- evm-foundrySkill
- evm-hardhatSkill
- evm-wallet-integrationSkill
- fee-abstractionSkill
- minipay-integrationSkill
- thirdwebSkill
- viemSkill
- wagmiSkill
- x402Skill
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 196
All standard Ethereum JSON-RPC methods are supported:
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Celo RPC Interactions
This skill covers interacting with the Celo blockchain via RPC endpoints.
When to Use
- Reading account balances (CELO and tokens)
- Querying transaction data
- Getting block information
- Interacting with Celo via viem or cast
Network Information
| Network | Chain ID | RPC Endpoint |
| Celo Mainnet | 42220 | https://forno.celo.org |
| Celo Sepolia | 11142220 | https://forno.celo-sepolia.celo-testnet.org |
Forno is a rate-limited, best-effort service. For production, use a dedicated RPC provider.
Alternative RPC Providers
| Provider | Mainnet | Testnet |
| Alchemy | https://celo-mainnet.g.alchemy.com/v2/{API_KEY} | https://celo-sepolia.g.alchemy.com/v2/{API_KEY} |
| Infura | https://celo-mainnet.infura.io/v3/{API_KEY} | https://celo-sepolia.infura.io/v3/{API_KEY} |
| Ankr | https://rpc.ankr.com/celo | https://rpc.ankr.com/celo_testnet |
| QuickNode | Custom endpoint via dashboard | Custom endpoint via dashboard |
Block Explorers
- Celo Mainnet: https://celoscan.io
- Celo Sepolia: https://sepolia.celoscan.io
Using viem with Celo
Installation
npm install viemBasic Setup
import { createPublicClient, http } from "viem";
import { celo, celoSepolia } from "viem/chains";
// Mainnet client
const publicClient = createPublicClient({
chain: celo,
transport: http("https://forno.celo.org"),
});
// Testnet client (Celo Sepolia)
const testnetClient = createPublicClient({
chain: celoSepolia,
transport: http("https://forno.celo-sepolia.celo-testnet.org"),
});Reading Balances
// Get CELO balance
const balance = await publicClient.getBalance({
address: "0x...",
});
console.log("Balance:", balance, "wei");
// Get token balance (e.g., cUSD)
const cUSD = "0x765de816845861e75a25fca122bb6898b8b1282a";
const tokenBalance = await publicClient.readContract({
address: cUSD,
abi: [
{
name: "balanceOf",
type: "function",
stateMutability: "view",
inputs: [{ name: "account", type: "address" }],
outputs: [{ type: "uint256" }],
},
],
functionName: "balanceOf",
args: ["0x..."],
});Getting Block Data
// Get latest block number
const blockNumber = await publicClient.getBlockNumber();
// Get block by number
const block = await publicClient.getBlock({
blockNumber: 12345678n,
});
// Get block by hash
const blockByHash = await publicClient.getBlock({
blockHash: "0x...",
});Getting Transaction Data
// Get transaction by hash
const tx = await publicClient.getTransaction({
hash: "0x...",
});
// Get transaction receipt
const receipt = await publicClient.getTransactionReceipt({
hash: "0x...",
});Using cast (Foundry)
Reading Data
# Get CELO balance
cast balance 0x... --rpc-url https://forno.celo.org
# Get block number
cast block-number --rpc-url https://forno.celo.org
# Get block details
cast block 12345678 --rpc-url https://forno.celo.org
# Get transaction
cast tx 0x... --rpc-url https://forno.celo.org
# Call view function
cast call 0x765de816845861e75a25fca122bb6898b8b1282a \
"balanceOf(address)(uint256)" \
0x... \
--rpc-url https://forno.celo.org
# Get storage slot
cast storage 0x... 0 --rpc-url https://forno.celo.orgChain Information
# Get chain ID
cast chain-id --rpc-url https://forno.celo.org
# Get gas price
cast gas-price --rpc-url https://forno.celo.orgUsing curl (Raw RPC)
Get Balance
curl -X POST https://forno.celo.org \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0x...", "latest"],
"id": 1
}'Get Block Number
curl -X POST https://forno.celo.org \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_blockNumber",
"params": [],
"id": 1
}'Standard EVM RPC Methods
All standard Ethereum JSON-RPC methods are supported:
| Method | Description |
| eth_blockNumber | Returns the current block number |
| eth_getBalance | Returns the balance of an address |
| eth_getTransactionByHash | Returns transaction by hash |
| eth_getTransactionReceipt | Returns transaction receipt |
| eth_call | Executes a call without creating a transaction |
| eth_estimateGas | Estimates gas for a transaction |
| eth_gasPrice | Returns current gas price |
| eth_getBlockByNumber | Returns block by number |
| eth_getBlockByHash | Returns block by hash |
| eth_getLogs | Returns logs matching filter |
| eth_sendRawTransaction | Sends a signed transaction |
Additional Resources
- rpc-providers.md - Full list of RPC providers
Source of truth: Celopedia
These skills are focused, task-level references. For anything broader — verified contract addresses, ecosystem and protocol data, listing requirements, grants, governance, migration guides, or cross-cutting Celo questions — Celopedia is the canonical source and is kept current. Where this skill and Celopedia disagree, Celopedia wins.
npx skills add celo-org/celopedia-skillsDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

