返回顶部
f

fulfill-git-escrow完成Git托管赏金

Fulfill a git escrow bounty by writing a solution or submitting an existing one. Use when the user wants to solve a test suite challenge, write code to pass tests, and claim a token reward. Requires the git-escrows CLI (npm i -g git-escrows).

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
218
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

fulfill-git-escrow

完成 Git 托管合约

您正在帮助用户完成一个 Git 托管合约的赏金任务。这意味着提交能够通过失败测试套件的代码,以领取托管合约中的代币奖励。

有两种模式:

  • - 模式 A(编写 + 提交):您编写解决方案代码,提交并完成提交。当用户未提供 --solution-repo 时,此为默认模式。
  • 模式 B(提交现有方案):用户已有解决方案仓库和提交记录。您只需完成提交。

根据用户输入确定模式:

  • - 如果用户提供 --solution-repo,使用模式 B
  • 否则,使用模式 A

托管合约 UID 始终是必需的。

步骤 1:检查 CLI 可用性

运行 git-escrows --help 验证 CLI 是否已安装。如果失败,尝试 npx git-escrows --help 或 bunx git-escrows --help。后续所有命令使用可用的那个。如果都不行,告知用户使用 npm i -g git-escrows 安装。

步骤 2:检查 .env 配置

检查当前目录是否存在 .env 文件。如果没有,告知用户需要创建并建议运行:

git-escrows new-client --privateKey 0x... --network sepolia

步骤 3:验证托管合约

运行 git-escrows list --verbose --format json 并找到与提供的 UID 匹配的托管合约。确认:

  • - 托管合约存在且状态为开放
  • 记录测试仓库 URL、测试提交哈希、奖励金额和预言机地址

如果未提供托管合约 UID,向用户询问。您可以使用 git-escrows list --status open 帮助用户浏览。

模式 A:编写解决方案 + 提交

A1:理解测试

克隆或读取测试仓库以理解测试的预期:

  1. 1. 从托管合约详情中识别测试仓库 URL 和提交
  2. 克隆到临时位置:git clone /tmp/escrow-tests- && cd /tmp/escrow-tests- && git checkout
  3. 读取测试文件以理解:

- 测试导入的函数/模块/API
- 它们断言的行为
- 使用的测试框架
- 预期的项目结构

A2:编写解决方案

当前工作目录(或用户指定的子目录)中:

  1. 1. 创建/修改文件以实现能使测试通过的代码
  2. 遵循测试预期的项目结构(例如,如果测试从 src/math.ts 导入,则创建该文件)
  3. 包含必要的配置文件(package.json、Cargo.toml 等)
  4. 确保测试框架的依赖项已处理

A3:提交并获取仓库详情

  1. 1. 暂存并提交解决方案:git add -A && git commit -m solution for escrow
  2. 获取提交哈希:git rev-parse HEAD
  3. 获取远程 URL:git remote get-url origin
- 如果没有远程仓库,要求用户推送到公共 Git 仓库并提供 URL

A4:完成提交

git-escrows fulfill \
--escrow-uid \
--solution-repo \
--solution-commit

模式 B:提交现有解决方案

B1:收集参数

从用户输入中提取:

  • - --solution-repo:包含解决方案的 Git 仓库 URL
  • --solution-commit:解决方案的提交哈希

如果缺少任何一项,向用户询问。

B2:完成提交

git-escrows fulfill \
--escrow-uid \
--solution-repo \
--solution-commit

步骤 4:报告结果(两种模式)

成功执行后:

  • - 突出显示完成 UID
  • 解释预言机将自动测试解决方案
  • 提供仲裁通过后的领取命令:

git-escrows collect --escrow-uid --fulfillment-uid

  • - 建议使用 git-escrows list --verbose 检查状态

如果命令失败,帮助诊断问题(托管合约已完成、网络错误、密钥未注册等)。如果用户的 Git 密钥未注册,建议使用 git-escrows register-key。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 fulfill-git-escrow-1776128108 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 fulfill-git-escrow-1776128108 技能

通过命令行安装

skillhub install fulfill-git-escrow-1776128108

下载

⬇ 下载 fulfill-git-escrow v1.0.0(免费)

文件大小: 2.61 KB | 发布时间: 2026-4-15 12:48

v1.0.0 最新 2026-4-15 12:48
Initial release of fulfill-git-escrow

- Enables users to fulfill git escrow bounties by submitting solutions that pass test suites and claim token rewards.
- Supports two modes: writing and submitting a new solution, or submitting an existing solution repository and commit.
- Requires git-escrows CLI, git, a configured .env with PRIVATE_KEY, and network access to Ethereum RPC.
- Provides step-by-step guidance, including CLI/tool configuration checks, escrow validation, solution packaging, and fulfillment submission.
- Includes troubleshooting and status checking instructions for smooth fulfillment and reward claiming.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部