Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (tronbox) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
TronBox
TronBox is a tool for developing, testing, and deploying smart contracts. It is designed for blockchains using the TRON Virtual Machine (TVM).
- Built-in smart contract compilation, linking, deployment, and binary management.
- External script runner that executes scripts within a TronBox environment.
- Interactive console for direct contract communication.
- Automated contract testing for rapid development.
- Scriptable, extensible deployment & migrations framework.
- Network management for deploying to any number of public & private networks.
TronBox is a fork of Truffle.
Quick Start
Install
Before you can use TronBox, install it using the npm command. For details, see Install TronBox.
$ npm install -g tronboxNote: To verify the PGP signature, see here.
Create a default Tron-Box Project
You can create a bare project without smart contracts, run:
$ tronbox initOnce this operation is completed, you'll now have a project structure with the following items:
contracts/: Directory for Solidity contracts
migrations/: Directory for scriptable deployment files
test/: Directory for test files for testing your application and contracts
tronbox.js: TronBox configuration file
For those getting started, you can use TronBox Boxes, which offers example applications and project templates. For details, see Create a TronBox Project.
Compile
If you want to only compile, run:
$ tronbox compileTo compile all contracts, use the --compile-all option.
Specify a network using the --network option. Network name must exist in the configuration. For details, see Compile a Project.
Migrate
To deploy our smart contracts, you need to connect to a blockchain. Use the TronBox Runtime Environment to create and interact with the blockchain. For details, see Contract Deployment (Migrations).
To run your migrations, run the following:
$ tronbox migrateTest
To run all tests, run:
$ tronbox testAlternatively, you can specify a path to a specific file you want to run: tronbox test ./path/to/test/file.js. For details, see Test Your Contracts.
Interact with the contract
To interact with the contract, run:
$ tronbox consoleYou will see the following prompt:
$ tronbox(development)>The name in the parentheses of the prompt tronbox(development)> is the network that is currently connected to. For details, see Interact with a Contract.
Development
To dive deeper into advanced topics of the TronBox project lifecycle, please see the Official TronBox Documentation for guides, tips, and examples.
To contribute, see CONTRIUTING.MD.