Pact Protocol
07 / 测试 · 给测试同事

测试手册

把这个 URL 发给测试同事就够了。URL 清单 + 4 种角色路径 + 完整 E2E 流程 + 验收 sign-off,一页完结。

5 分钟看完是什么

Pact 是 Web3 版 “C2C 内容营销 escrow + 信誉”。商家(Demand)把 PACT 锁进合约,创作者(Supply)发完内容达到 KPI 自动领钱。Oracle 在中间多签上链。 信誉以不可转让 SBT 累积在 ERC-6551 智能账户上;NFT 转人,信誉跟人走

测的是 testnet (chainId 9777),所有交易免费,失败不亏真钱。

01 · URL 清单

全部已验证 200,可直接打开

入口(理解协议)
pact.gjs.ink/主页
/start30 分钟 onboarding
/roles5 个角色
/economics经济模型
/deploy自部署索引
操作入口(真做事)
pact.gjs.ink/5 身份前端
/advertiser商家发单 + 仲裁
/creator创作者注册 + 看 SBT
/oracle只读多签历史
/admin仲裁 (需 ADMIN_ROLE)
pact-faucet.gjs.ink领 100 PACT/天
pact-explorer.gjs.inkBlockscout
后端 API(脚本测试用)
/health全系统健康 + 3 oracle 节点
/openapi.json全部 REST schema
/api/v1/creators/列已注册创作者
/api/v1/campaigns/列所有 campaign
/api/v1/oracle/commits多签历史 audit
Agent 入口(LLM 友好)
/llms.txtLLM 索引
/llms-full.txt76 KB 全文档
/agents/hermes/manifest.jsonHermes 配置
/agents/marketing/manifest.jsonMarketing 配置
/agents/oracle/manifest.jsonOracle 配置
02 · 测试目标

10 条全 PASS = 验收通过

  1. [T1] 落地页 /start 能让一个新人看完知道自己第一步该做啥
  2. [T2] MetaMask 加 chainId 9777 + RPC https://pact-chain.gjs.ink 能连上
  3. [T3] Faucet 能领到 testnet PACT
  4. [T4] /creator 注册档案成功 + GET /api/v1/creators/ 能查到自己
  5. [T5] /advertiser 创建 campaign 链上 tx 真上链(explorer 可查)
  6. [T6] activate 后 status: Pending → Active(escrow 锁仓 PACT)
  7. [T7] /oracle/commits 看到至少 1 笔历史多签 tx
  8. [T8] 一笔完整 campaign 走完 5 个状态变化:Pending → Active → Settling → Settled
  9. [T9] release 后:创作者 6551 收到 amount × 97% + 1 SBT
  10. [T10] LLM 用 manifest 答对 “agent 怎么拿到钱包”
03 · 4 种角色,4 种路径

每人挑一个,15 分钟跑完

路径 A · Creator · 15 分钟
测试同事扮演创作者
1. 装 MetaMask → 加网络:
   Name: Pact Testnet
   RPC:  https://pact-chain.gjs.ink
   ID:   9777
   Currency: PACT

2. https://pact-faucet.gjs.ink → 领 100 PACT

3. https://pact.gjs.ink/creator → 连钱包

4. ADR-2 双步绑定:
   - 点 Bind wallet → 拿 challenge
   - MetaMask 签 EIP-191 → 提交

5. 填档案: 名字 + bilibili_uid (可空)

6. 验证:
$ curl 'https://pact-api.gjs.ink/api/v1/creators/?limit=100' \
     | grep <你钱包后 8 位>

✓ Pass: 看到自己,sbt_count: 0
路径 B · Advertiser · 15 分钟
测试同事扮演商家(需要 A 先完成)
1. 同 A 1-2 步 装钱包 + 领 PACT (另一个钱包!)

2. https://pact.gjs.ink/advertiser → 连钱包

3. 填表:
   - Creator: <测试 A 的钱包地址>
   - Platform: twitter
   - Content ID: test-2026-XXX
   - Amount: 100
   - KPI Threshold: 30000

4. 选 direct mode,签 2 次:
   - approve(escrow, 100)
   - createCampaign(...)

5. 复制 tx hash → explorer 搜
✓ Pass: status Success + CampaignCreated event

6. 列表点 Activate → 再签
✓ Pass: status 0 → 1
路径 C · Oracle 观察者 · 5 分钟
测试同事扮演 Oracle 观察者(只读)
1. 看 committee 健康:
$ curl https://pact-api.gjs.ink/health \
     | jq .oracle_committee
✓ 3 个 node 全 status: ok

2. 看多签历史:
$ curl https://pact-api.gjs.ink/api/v1/oracle/commits \
     | jq '.[0:3]'
✓ 看到 tx_hash + kpi_value + raw_data_hash

3. 贴任意 tx 到 explorer:
   https://pact-explorer.gjs.ink/tx/<tx_hash>
✓ 看到 submitOracleDataMultisig + 多个 signature

4. (可选) 直接 ping 3 个 oracle nodes:
$ curl http://46.250.255.92:9001/health
$ curl http://46.250.255.45:9001/health
$ curl http://46.250.254.157:9001/health
路径 D · LLM agent · 10 分钟
测试同事扮演 LLM agent(自动化)

把以下贴给 Claude / GPT,验证它仅用 curl 完成任务:

你是测试 agent。仅用 curl 完成:
1. 拿 Pact 所有合约地址
2. 列 Oracle committee 3 个签名地址
3. 解释 "Agent 怎么拿到钱包" (3 类钱包)
4. 拿 Hermes system prompt
5. 列已注册创作者

起点: https://pact.gjs.ink/llms.txt

✓ Pass: LLM 从 /.well-known/pact-protocol.json 答出 contracts + oracle_committee + wallet_roles;从 /agents/hermes/system-prompt.txt 拿到 prompt;从 /api/v1/creators/?limit=100 拿到列表。

04 · 完整 E2E “委托 → 执行 → 完成”

2 个测试同事配合 · ~90 分钟

其中 60 分钟是等 oracle 每小时 cron。需要赶时间,可以联系 [email protected] 手动触发 oracle multi-sig。

时间动作验证点
1T+0A 商家装钱包 + faucet 领 100 PACT钱包 ≥ 100 PACT
2T+3minB 创作者另一个钱包 + 领 1 PACT 做 gas钱包 ≥ 1 PACT
3T+5minB/creator 绑钱包 + 提交档案GET /api/v1/creators/ 看见 B
4T+8minA/advertiser 填表 + 签 approve + createCampaignexplorer 有 CampaignCreated
5T+12minA列表点 activatestatus 0 → 1
6T+15minBTwitter 发对应内容(含 contentId)tweet 真实可访问
7T+15→75系统Oracle 每小时 cron 自动跑/oracle/commits 新条目
8T+75min合约KPI ≥ threshold 自动翻转status 1 → 2 (Settling)
9T+78minA/advertiser 点 Releaseexplorer 看 Released event
10T+80minB看自己 6551 / 钱包余额+97 PACT, +1 SBT
可选:失败路径(dispute)

让 B 故意不发内容,等 settleBefore 过期:
→ A 点 Open Dispute → status 4 (Disputed) → A 押 10 PACT 提案 → admin /admin 仲裁 → status 5 (Refunded) → A 退回 100 PACT,B 无 SBT

05 · 常见现象(不是 bug)
  • · Oracle 60 分钟才更新一次 — cron 周期,不是卡住。赶时间找 admin manual submit。
  • · /creator 的 bilibili_uid 必须唯一。重测时换新 uid 或 null。
  • · /advertiser 第一次钱包弹两个签名 — approve + createCampaign,正常。
  • · Explorer 显示 tx 后 backend 索引 有 ~10s 延迟。等一下再 curl /api/v1/campaigns/。
06 · 测试期间能 ping 我做的
  • 1. mint Demand/Supply NFT 给你测试钱包(我跑 hardhat)
  • 2. 手动触发 oracle multi-sig submit(跳过 1h 等待)
  • 3. admin 仲裁一个测试 dispute
  • 4. backend 加 testnet KOL 数据
  • 5. 任何 backend/oracle/chain 看上去崩了,我远程修

通过 [email protected] 联系

07 · 验收

测试报告 — 复制填空

[Pact testnet 测试报告]
测试者: @xxx
日期: 2026-05-XX
角色: 创作者 / 商家 / Oracle 观察者 / LLM agent
钱包地址: 0x...

T1  落地页 /start 易懂           ☐ Pass / ☐ Fail
T2  MetaMask 加 chainId 9777     ☐ Pass / ☐ Fail
T3  Faucet 领 PACT               ☐ Pass / ☐ Fail
T4  /creator 注册 + API 查到     ☐ Pass / ☐ Fail
T5  /advertiser createCampaign   ☐ Pass / ☐ Fail · tx: 0x...
T6  Activate                     ☐ Pass / ☐ Fail
T7  /oracle/commits 有历史       ☐ Pass / ☐ Fail
T8  完整状态机走完              ☐ Pass / ☐ Fail
T9  Release 后 +97 PACT + SBT    ☐ Pass / ☐ Fail
T10 LLM 用 manifest 答对        ☐ Pass / ☐ Fail

观察 / 卡点:
...

最严重的 1 个问题:
...

# 发到 [email protected] 或团队 IM 群