natural-language-agreements/demo
Jeff Emmett 13692c22c6 feat: add Docker deployment setup and oracle improvements
Add Dockerfile, docker-compose.yml, .dockerignore for containerized deployment.
Switch base-sepolia RPC to public endpoint, add fromBlock parameter to oracle
to avoid scanning from genesis on public RPCs. Include demo scripts.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 21:19:14 +00:00
..
README.md feat: add Docker deployment setup and oracle improvements 2026-03-21 21:19:14 +00:00
demo.ts feat: add Docker deployment setup and oracle improvements 2026-03-21 21:19:14 +00:00

README.md

NLA Oracle Demo — Content Bounty

A demonstration of AI-arbitrated blockchain escrows using Natural Language Agreements.

Use Case: Content Creation Bounty

Scenario: Alice wants a blog post about regenerative economics. She creates an escrow locking 1000 tokens with the demand: "Write a blog post of at least 300 words explaining how regenerative economics differs from extractive capitalism, including at least one real-world example."

Bob writes the post and submits it as fulfillment. The NLA oracle (powered by Claude) reads both the demand and Bob's submission, then decides whether it meets the criteria. If approved, Bob collects the tokens.

Prerequisites

  1. Oracle wallet funded with Base Sepolia ETH (for gas to submit arbitration decisions)

    • Oracle: 0x2d2E0a49B733E3CBB2B6C04C417aa5E24cd2A70F
    • Faucets: Alchemy or Coinbase
  2. Demo wallet funded with Base Sepolia ETH (for deploying token + creating escrow)

    • Run bun run demo/setup.ts to see the demo wallet address
    • Fund it from the same faucet

Running the Demo

cd /opt/apps/natural-language-agreements

# Step 1: Deploy a test token and create the escrow
bun run demo/demo.ts create

# Step 2: Submit a fulfillment (as "Bob")
bun run demo/demo.ts fulfill

# Step 3: Check status (wait for oracle to arbitrate)
bun run demo/demo.ts status

# Step 4: Collect tokens (if approved)
bun run demo/demo.ts collect

How It Works

Alice creates escrow ──► Tokens locked on-chain
         │
Bob submits work ──────► Fulfillment recorded on-chain
         │
Oracle sees event ─────► Claude evaluates demand vs fulfillment
         │
Decision recorded ─────► "APPROVED" or "REJECTED" on-chain
         │
Bob collects tokens ───► Tokens transferred to Bob