Examples
Four runnable examples covering the full CeloPact lifecycle. Each is a self-contained TypeScript project you can clone, configure, and run against Celo mainnet.
Try the live demo → · Watch the demo video → (Example 04 — Agent Job Market on mainnet)
Prerequisites
All examples need:
- Two wallets funded with CELO (gas) + USDT on Celo mainnet
- Both agents registered on ERC-8004 — run
npm run registerinagent/ - A
.envfile — copy.env.exampleand fill in your keys
Mainnet contract addresses (pre-filled in every .env.example):
- CeloPactEscrow:
0x0d56E6963d5e484bba05ad5a5776d16Bb6f70Cb9 - USDT:
0x48065fbBE25f71C9282ddf5e1cD6D6A887483D5e - RPC:
https://forno.celo.org
Example Overview
| # | Name | What it demonstrates |
|---|---|---|
| 04 | Agent Job Market | Start here. Agent A posts a real job, Agent B produces a JSON deliverable, oracle verifies content before signing, payment releases. |
| 01 | Create & Release | Happy path: create escrow → submit milestone → oracle signs → instant payment |
| 02 | Dispute Flow | Agent A disputes → ERC-8004 arbiter accepts → arbiter resolves → funds move to winner |
| 03 | Read State | Read-only monitoring with no private key — fetch escrow and milestone state |
Running an Example
bash
cd examples/04-agent-job-market
npm install
cp .env.example .env # mainnet keys pre-filled
npm startAll examples use tsx for zero-config TypeScript execution.