TronBox is an open-source development framework and testing environment designed for smart contracts built on the TRON Virtual Machine (TVM). Currently stable at version 4.6.0, it follows a periodic release cadence, incorporating updates for Solidity compiler support, underlying dependency upgrades like `tronweb` and `ethers`, and framework enhancements. As a direct fork of the popular Ethereum development suite Truffle, TronBox provides a familiar and robust toolkit for TRON developers, offering features such as built-in contract compilation, linking, deployment, binary management, an external script runner, an interactive console, automated contract testing, and a scriptable migration framework. Its key differentiator is its specialized focus on the TRON ecosystem, adapting Truffle's established workflows and tools to the specifics of TRON blockchain development, including seamless integration with `tronweb` and support for TRON-specific network configurations.
npm install tronboxVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates the full lifecycle of a TronBox project: global installation, project initialization, creating a simple Solidity contract and its deployment migration, compilation, deployment to a development network, and interaction via the console.
Migrate any EPM-managed dependencies to npm or direct contract imports. Review your `tronbox-config.js` and migration scripts for EPM references.
Review the latest TronBox documentation for the correct default and configurable directory paths. Update your `tronbox-config.js` to reflect any necessary changes to avoid file lookup errors during compilation or deployment.
Refactor any code interacting with contract instances or blockchain APIs to use the `ethers.js` v6 API. Consult the `ethers.js` documentation for updated methods and patterns.
For building, use `tronbox compile`. For serving or watching files, integrate external tools (e.g., `webpack`, `nodemon`) into your development workflow. The `tronbox help` command provides updated command usage.
Ensure TronBox is installed globally using `npm install -g tronbox`. If already installed, verify your system's PATH environment variable.
Upgrade your Node.js installation to version 20.0.0 or higher. Using a version manager like `nvm` (Node Version Manager) is recommended: `nvm install 20 && nvm use 20`.
Open `tronbox-config.js` and add or correct the network configuration, ensuring the network name matches the one provided in the CLI command (e.g., `tronbox migrate --network myNetwork`).