0.2.0 • Published 4 years ago
@wavesenterprise/generator-cli v0.2.0
Waves Enterprise generator CLI
Requirements
Node.js 14 or higher (https://nodejs.org/en/download/)
Check the installation with typing these commands:
node -v
npm -v
Usage
1) Install npm package globally:
```
npm i @wavesenterprise/generator-cli -g
```
2) Create config file (for example, config.json):
{
"outputDir": "./output",
"generator": {
"txsFormat": "grpc",
"txsNumber": "2",
"crypto": "waves",
"networkByte": "V",
"distribution": {
"104": "100"
},
"templates": {
"104": {
"contractId": "FWEGMoZX8AQsNAAgiAtjG57d45B2PWs7pLAChsSr6hiU",
"contractVersion": "1",
"fee": 0,
"params": [{
"type": "string",
"key": "test_key",
"value": "run_test_1"
}]
}
}
},
"broadcast": {
"grpcAddresses": ["51.178.69.186:6865", "51.210.210.154:6865", "51.210.211.8:6865"],
"senderSeedPhrase": "examples seed phrase"
}
}
Options:
- crypto: "waves" or "gost"
- txsFormat: "json" or "grpc"
broadcast:
- grpcAddresses: list of grpc node interfaces. For each node generator creates one separate thread.
- senderSeedPhrase: the sender account used in all broadcasted transactions.
3) Run command
`generator-cli -c config.json`
4) Check the outputDir
folder, specified in config.json
Available run options
- -c: path to config file
- -broadcast: broadcast transactions using template from config file
-concurrency: average transactions per second for one thread.
Working only with -broadcast option.
Full example:
generator-cli -c config.json -broadcast -concurrency 30
Update installed package
To latest version:
npm i @wavesenterprise/generator-cli@latest -g
To specified version:
npm i @wavesenterprise/generator-cli@0.0.3 -g
Uninstall package
npm uninstall @wavesenterprise/generator-cli -g