TronBox is a development environment and framework for blockchains using the TRON Virtual Machine. Truffle provides the following core functionalities:
- Smart contract compilation
- Migration (deployment on the network)
- NodeJS 5.0+
- Windows, Linux, or Mac OS X
npm install -g tronbox
Note on Windows
For Windows, the best way to run TronBox is to install an Ubuntu subsystem: https://docs.microsoft.com/en-us/windows/wsl/install-win10. After running Ubuntu from the prompt, proceed as usual. It is not recommended to run TronBox from Powershell.
tronbox init initializes the file structure of a tronbox project.
The directory storing all smart contract files.
The directory storing all test scripts for testing the smart contract.
The configuration file of the project. Declare your Full Node address and Event Server in this file.
Compiles all the smart contracts. The compiled result is stored into ./build/contracts.
This command only compiles files that have been modified since the last compile.
tronbox compile --compile-all
Re-compiles all the smart contracts.
Deploys the contract. This command only migrates changes since the last successful migration.
tronbox migrate --reset
Re-migrates all the smart contracts.
tronbox test [test_script_path]
Runs all test scripts. Test file name definition is optional. 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, the contract is re-loaded. After invoking the
migrate--resetcommand, you can immediately use the new address and binary.
Every returned command's promise is automatically logged. There is no need to use
then(), which simplifies the command.
|Smart Contract Deployment|