/install clawcontract
ClawContract
Generate, analyze, deploy, and verify smart contracts on BNB Chain via CLI.
Source & install: \x3Chttps://github.com/cvpfus/clawcontract> — 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
| Key | Chain | Testnet |
|---|---|---|
bsc-mainnet |
BNB Smart Chain | No |
bsc-testnet |
BNB Smart Chain Testnet | Yes |
opbnb-mainnet |
opBNB | No |
opbnb-testnet |
opBNB Testnet | Yes |
Default: bsc-testnet.
Env Vars
Configure via docker-compose.yml or set directly in the environment.
| Variable | Required | Purpose |
|---|---|---|
CLAWCONTRACT_OPENROUTER_API_KEY |
Yes | AI contract generation |
CLAWCONTRACT_PRIVATE_KEY |
For deploy | Wallet for deployment — must be supplied by user |
CLAWCONTRACT_BSCSCAN_API_KEY |
For verify | Contract verification on BscScan/opBNBScan |
CLAWCONTRACT_OPENROUTER_MODEL |
No | Model override (default: anthropic/claude-sonnet-4-20250514) |
Artifacts
The CLI writes the following files to disk during normal operation:
| Path | When | Contents |
|---|---|---|
contracts/*.sol |
generate, full |
Generated Solidity source |
.deployments/*.json |
deploy, full |
Deployment metadata (address, chain, tx hash) |
Safety
- No auto-generated keys.
CLAWCONTRACT_PRIVATE_KEYmust 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
--chainexplicitly (default isbsc-testnet). deleteconfirmation prompt.deleteis the sole interactive command — it shows deployment details and asksRemove this deployment? (y/N). Use--forceto skip the prompt (agent-friendly). This is safe becausedeleteonly 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-fixto disable auto-fix entirely. - Use
--skip-deployto review the final source and analysis before any on-chain action. - Fixes only target the generated file in
contracts/; no other files are modified.
- Use
- Accidental live-deploy risk. Because
CLAWCONTRACT_PRIVATE_KEYis mandatory for deploy and the default chain isbsc-testnet, accidental mainnet deploys require the user to both set a funded mainnet key and explicitly pass--chain bsc-mainnetor--chain opbnb-mainnet. Neither can happen silently. - Prefer testnet chains and throwaway keys for initial trials.
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install clawcontract - 安装完成后,直接呼叫该 Skill 的名称或使用
/clawcontract触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
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... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 769 次。
如何安装 clawcontract?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install clawcontract」即可一键安装,无需额外配置。
clawcontract 是免费的吗?
是的,clawcontract 完全免费(开源免费),可自由下载、安装和使用。
clawcontract 支持哪些平台?
clawcontract 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 clawcontract?
由 cvpfus(@sufnoobzac)开发并维护,当前版本 v1.0.8。