The purpose of it is to set up a complete private network for Tron development by Docker. #Build
**_ Minimum Hardware Requirements _**
CPU: 64-bit x86_64, 2+ Cores
RAM: 4 GB+
The latest version Docker
Pull the image using Docker:
Run the container:
The --rm option automatically removes the container after it exits. This is very important because the container cannot be restarted; it MUST be run from scratch to configure the environment correctly.
Verify the image is running correctly: After entering the command form shell1, contents like shell2 will be displayed
If Redis-server, nodes, or the event server are not running, exit and rerun the container.
View the log of a full node:
Use -e flag to pass environmental variables to the docker. Example:
List of options:
accounts=12 sets the number of generated accounts
useDefaultPrivateKey=true tells Quickstart to use the default account as accounts
mnemonic=wrong bit chicken kitchen rat uses a specified mnemonic
defaultBalance=100000 sets the initial balance for the generated accounts (in the example to 100,000 TRX)
seed=ushwe63hgeWUS sets the seed to be used to generate the mnemonic (if none is passed)
hdPath=m/44'/60'/0'/0 sets a custom bit39 hdPath
formatJson=true formats the output
preapprove=... pre approved proposals (see below for more help)
To pre-approve, for example, getMultiSignFee and allowMultiSign, you can run the images as:
Complete list of proposals: https://api.trongrid.io/wallet/getchainparameters
## Available testing accounts
## Add accounts
## Fixed accounts
Two ways to use the same accounts each time:
Passing a mnemonic to the docker
Using accounts-data/accounts.json, put your own private keys in the privateKeys array, and run the container.
## TronBox 2.1+ configuration
Configure the tronbox.js file as:
## TronWeb configuration
Instantiate tronWeb as following:
Interact with the private network is by using TronWeb from the container:
Set the ports when starting the docker image to interact with the private network via RPC.
Running TronBox can put a lot of stress on the local network. If the FullNode is busy, it returns the "SERVER_BUSY" error. If it does, just repeat your command.
## Source code