← 返回
数据分析 Key 中文

clawcontract

AI-powered smart contract generator, analyzer, and deployer for BNB Chain (BSC/opBNB). Use when you need to generate Solidity from natural language, run secu...
AI驱动的智能合约生成、分析与部署工具,支持BNB Chain(BSC/opBNB)。用于从自然语言生成Solidity代码、执行安全检查等场景。
sufnoobzac
数据分析 clawhub v1.0.8 1 版本 99914.1 Key: 需要
★ 0
Stars
📥 1,163
下载
💾 11
安装
1
版本
#latest

概述

ClawContract

Generate, analyze, deploy, and verify smart contracts on BNB Chain via CLI.

Source & install: — clone the repo, run pnpm install && pnpm build && npm link.

Quick Start

Generate a contract:

clawcontract generate "escrow contract for peer to peer trades with dispute resolution and timeout auto release"

Full pipeline (generate → analyze → deploy → verify):

clawcontract full "escrow contract for peer to peer trades with dispute resolution and timeout auto release" --chain bsc-testnet

Deploy an existing contract:

clawcontract deploy ./contracts/VibeToken.sol --chain bsc-testnet

Interact with a deployed contract:

clawcontract interact 0xABC... name --chain bsc-testnet

List deployment records:

clawcontract list

clawcontract list --chain bsc-testnet

Delete a deployment record:

clawcontract delete 0xABC...def

References

  • Full command reference (all flags, examples, notes): See {baseDir}/references/commands.md

Supported Chains

KeyChainTestnet
---------------------
bsc-mainnetBNB Smart ChainNo
bsc-testnetBNB Smart Chain TestnetYes
opbnb-mainnetopBNBNo
opbnb-testnetopBNB TestnetYes

Default: bsc-testnet.

Env Vars

Configure via docker-compose.yml or set directly in the environment.

VariableRequiredPurpose
-----------------------------
CLAWCONTRACT_OPENROUTER_API_KEYYesAI contract generation
CLAWCONTRACT_PRIVATE_KEYFor deployWallet for deployment — must be supplied by user
CLAWCONTRACT_BSCSCAN_API_KEYFor verifyContract verification on BscScan/opBNBScan
CLAWCONTRACT_OPENROUTER_MODELNoModel override (default: anthropic/claude-sonnet-4-20250514)

Artifacts

The CLI writes the following files to disk during normal operation:

PathWhenContents
----------------------
contracts/*.solgenerate, fullGenerated Solidity source
.deployments/*.jsondeploy, fullDeployment metadata (address, chain, tx hash)

Safety

  • No auto-generated keys. CLAWCONTRACT_PRIVATE_KEY must be explicitly provided by the user via environment variable. The CLI will not generate or persist a private key on its own.
  • Mainnet warning (non-blocking). Deployment to mainnet chains prints a bold warning about real costs but does not block on a prompt — the deploy proceeds automatically. This is by design: the CLI targets agent-driven pipelines where stdin is unavailable. Users control mainnet exposure by choosing --chain explicitly (default is bsc-testnet).
  • delete confirmation prompt. delete is the sole interactive command — it shows deployment details and asks Remove this deployment? (y/N). Use --force to skip the prompt (agent-friendly). This is safe because delete only removes local metadata; it cannot affect on-chain state.
  • Automatic fix attempts. During full, if high-severity issues are found the AI attempts to fix and re-analyze (up to 3 rounds). This means the agent may modify generated source before deploy. Mitigations:
  • Use --skip-fix to disable auto-fix entirely.
  • Use --skip-deploy to review the final source and analysis before any on-chain action.
  • Fixes only target the generated file in contracts/; no other files are modified.
  • Accidental live-deploy risk. Because CLAWCONTRACT_PRIVATE_KEY is mandatory for deploy and the default chain is bsc-testnet, accidental mainnet deploys require the user to both set a funded mainnet key and explicitly pass --chain bsc-mainnet or --chain opbnb-mainnet. Neither can happen silently.
  • Prefer testnet chains and throwaway keys for initial trials.

版本历史

共 1 个版本

  • v1.0.8 当前
    2026-03-29 04:49 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 166 📥 60,282
data-analysis

Data Analysis

ivangdavila
{"answer":"数据分析与可视化。查询数据库、生成报告、自动化电子表格,将原始数据转化为清晰可行的见解。适用于:(1) 您……"}
★ 199 📥 65,275
data-analysis

Excel / XLSX

ivangdavila
创建、检查和编辑 Microsoft Excel 工作簿及 XLSX 文件,支持可靠的公式、日期、类型、格式、重算及模板保留功能。
★ 368 📥 140,902