1.0.0 • Published 2 years ago

subdata v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

subdata

subdata is a command line tool for generating fake data for the substrate-based chain

Installation

npm install -g git+https://github.com/bingryan/subdata.git

Options

The following options are supported by the generate script.

OptionDescriptionRequiredDefault
--configPath to config file.Yesby your input
--formatconfig file formatNojson only now
--typescustom chain type fileNoby your input

Usage

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

Requirements

generate data uses a utility.batch method to speed up.To use this tool, you must add the utility pallet to your chain

DataType

The application utilizes Chance.js, so any data type supported by Chance.js is supported by subdata.

custom datatype

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"
      ]
    }
  }
}

Example

subdata -c configs/substrate.json