agentleFS
celo-orgcelo-org/agent-skills/skills/celo-rpc/SKILL.md

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

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
  1. Distinctive:

    All standard Ethereum JSON-RPC methods are supported:

    line 196

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

NetworkChain IDRPC Endpoint
Celo Mainnet42220https://forno.celo.org
Celo Sepolia11142220https://forno.celo-sepolia.celo-testnet.org

Forno is a rate-limited, best-effort service. For production, use a dedicated RPC provider.

Alternative RPC Providers

Block Explorers

Using viem with Celo

Installation

npm install viem

Basic 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.org

Chain Information

# Get chain ID
cast chain-id --rpc-url https://forno.celo.org

# Get gas price
cast gas-price --rpc-url https://forno.celo.org

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

MethodDescription
eth_blockNumberReturns the current block number
eth_getBalanceReturns the balance of an address
eth_getTransactionByHashReturns transaction by hash
eth_getTransactionReceiptReturns transaction receipt
eth_callExecutes a call without creating a transaction
eth_estimateGasEstimates gas for a transaction
eth_gasPriceReturns current gas price
eth_getBlockByNumberReturns block by number
eth_getBlockByHashReturns block by hash
eth_getLogsReturns logs matching filter
eth_sendRawTransactionSends 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-skills

Download now (ZIP)

Does 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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.