tronbox

📁 hairyf/blockchain-skills 📅 3 days ago
3
总安装量
3
周安装量
#62482
全站排名
安装命令
npx skills add https://github.com/hairyf/blockchain-skills --skill tronbox

Agent 安装分布

opencode 3
github-copilot 3
codex 3
kimi-cli 3
gemini-cli 3
cursor 3

Skill 文档

The skill is based on TronBox v4.5.0, generated at 2026-02-25.

TronBox is a Truffle-style framework for TRON: smart contract compilation, migrations, testing, and an interactive console. It supports both the native TRON Virtual Machine (TVM) and EVM-compatible chains (e.g. BTTC) via a separate config and the --evm flag. Migrations and tests use ethers v6 in EVM mode and TronWeb for TVM.

Core References

Topic Description Reference
Configuration tronbox.js / tronbox-evm-config.js, networks, paths, solc core-config
Migrations & Deployer Migration scripts, deploy/link/then API, context (artifacts, tronWeb, ethers) core-migrations
Compile Compiling contracts, –all / –evm, build output core-compile
Testing tronbox test, test discovery, artifacts in tests core-testing
Console Interactive REPL with contract abstractions core-console
CLI All commands and options core-cli
Artifacts & Resolver Build output shape, resolver order, artifacts.require / resolve core-artifacts-resolver
Contract abstraction new(), at(), deployed(), call(), link, defaults core-contract-abstraction

Features

Topic Description Reference
EVM mode EVM chains, tronbox-evm-config.js, –evm, ethers features-evm
Init & Unbox tronbox init (sample/MetaCoin), unbox templates features-init-unbox
Flatten Flatten contracts and dependencies to single file (verification/auditing) features-flatten
Deploy Alias for migrate; same options and behavior features-deploy
TronWrap & provider TronWeb/ethers context, waitForTransactionReceipt, TRE features-tronwrap

Best Practices

Topic Description Reference
Environment & networks Environment.detect, default network, network_id/from, common errors best-practices-environment
Errors & exit behavior TaskError, config/compile/migrate errors, exit codes best-practices-errors