TronBox is a development environment. At its core, it provides the following functionality:
- Smart contract compilation
- Migration (deployment on the network)
TronBox can be quickly set up and launched from the Terminal.
- NodeJS 5.0+
- Windows, Linux, or Mac OS X
npm install -g tronbox
Note on Version
For the latest Java-Tron Odyssey 3.2 release, the minimum compatible TronBox version is TronBox 2.2.1. Please ensure you have this version installed.
$ tronbox init
this will initialize the file structure of your tronbox project
All your smart contract goes here
holding all your test scripts to test your smart contract
the configuration of your project. Declare your fullnode address and event server in this file
compile all your smart contracts. The result goes into ./build/contracts.
it will only compile files being modified since the last compile
tronbox compile --compile-all
deploy your contract.
it will only do migrate changes since the last successful migration
tronbox migrate --reset
tronbox test [test_script_path]
run all test scripts. it is optional to define test file name. It also can be run with --reset flag
The console supports the
tronbox command. For example, you can invoke
migrate --reset in the console. The result is the same as invoking
tronbox migrate --reset in the command.
All the compiled contracts can be used, just like in development & test, front-end code, or during script migration.
After each command, your contract will be re-loaded. After invoking the
migrate--resetcommand, you can immediately use the new address and binary.
Every returned command's promise will automatically be logged. There is no need to use
then(), which simplifies the command.
|Smart Contract Deployment|