subdata
is a command line tool for generating fake data for the substrate-based
chain
npm install -g git+https://github.com/bingryan/subdata.git
The following options are supported by the generate script.
Option | Description | Required | Default |
---|---|---|---|
--config | Path to config file. | Yes | by your input |
--format | config file format | No | json only now |
--types | custom chain type file | No | by your input |
Usage: subdata [options]
Options:
-V, --version output the version number
-c, --config <config> Path to config file.
-f, --format <format> config file format [default: json]
-t, --types <types> custom datatype from chain
-h, --help display help for command
generate data uses a utility.batch method to speed up.To use this tool, you must add the utility pallet to your chain
The application utilizes Chance.js, so any data type supported by Chance.js is supported by subdata.
You can customize the data type at meta.datatype
, the format is: type-array
, such as the following:
{
"meta": {
"datatype": {
"website": [
"google.com",
"github.com"
]
}
}
}
subdata -c configs/substrate.json