Woodpecker 2.0 · Base Sepolia 测试网 · 2026-10-19
Token gateway 使用全过程
一个 API key 经过 /devportal skill 变成一个 gateway Worker;开发者在 Portal 部署代币、验证、分发、发布;管理员在 Admin Console 添加服务;client 在 Client Console 授权并付费调用;最后在 Portal 核对统计。视频只跟一个服务 gpt-demo,从第一步到最后一步。
章节
自己测试:12 个步骤
- 准备 md 文件
每个 API 一个 section;section 名以
-token结尾;第一行 secret 是 key;url:与note:可选。不要用 cat 或编辑器在别人面前打开它。 - Portal → Wallet
用访问令牌登录 devportal-dvb.pages.dev;创建或导入钱包;导出备份;领取测试 ETH(一个 gateway 约需 0.00007 ETH)。
- Claude Code:deploy
在
~/DevTemp/DeveloperTest启动 Claude Code。问题全部可选默认值。结束时报告给出 Worker 地址、submitter 地址和状态awaiting_token。/devportal deploy /Users/steven/DevTemp/DeveloperPortal/apikey.md --section gpt-token --preset openai-compatible --service <id> --symbol <tSymbol> --owner <Portal 钱包地址> - Portal → Services
按 URL 添加
https://<id>.stevenevans669.workers.dev;Fund submitter(本次 0.00005 ETH,一笔交易)。 - Portal → Tokens
Deploy token:一个对话框,两笔交易(部署 ServiceToken,再
setService(submitter))。复制卡片上的 bind 命令。 - Claude Code:bind
粘贴 bind 命令。结果应为
ready: true。/devportal bind <id> <代币地址> - Portal → Services → Verify
9 行全部通过:网关检查、mint、approve、authorize、quote、付费调用、used == actual、revoke、完成。卡片变为 verified。
- Portal → Distribute
向 client 钱包
0x957dfb0A71C6ec65f38624DbE068Bb670D81fF41铸造代币(本次 20)。 - Portal → Publish
复制服务 JSON 或 URL,交给 Engine 的管理员。
- Admin Console → Services
在
/admin/services填入 gateway URL → Fetch → 预览显示 Valid → Add → 该行显示 available。 - Client Console
新建 conversation;只勾选工具
<id 中的 - 换成 _>_chat;为新代币设 cap(本次 10);签名两次(approve、authorize);发送任务。Spends 中出现 kind tool、settled 的记录。Ask gpt_demo_chat what the capital of Malaysia is, then quote the charged amount. - Portal → Statistics
付款人与调用表应与 Spends 一致(max、actual、结算交易)。
本次录制的数据
| Gateway | https://gpt-demo.stevenevans669.workers.dev(template 0.2.0) |
| Submitter(payTo) | 0xC6A066180fA7F7519b1450EFc579171FD1DfF87b |
| 代币 tGptDemo | 0x5e2561120f68aC5fFC587F14D08255a4ff947215(owner 0x68DF751eB12EE466FB36Ee0b073614E903926536) |
| Verify | 9/9;付费调用 max 1 / actual 1;结算 0xf99358…2b679f |
| Distribute | 20 tGptDemo → 0x957d…fF41;交易 0xe3f33b…f6565c |
| Conversation | #12529;identity 0x71b0…4b9c;cap 10,used 1;结算 0x4dd245…133aaa |