A command-line tool to check the storage status of files on the Crust Network. This tool allows you to verify file replication status, size, and other on-chain information for files stored on Crust Network.
- Check file storage status on Crust Network
- Support for batch processing via input file
- Interactive input mode
- Configurable minimum replicas count
- Flexible logging options with different output formats
- Cross-platform support (Linux, Windows)
- Node.js 18 or higher
- npm or yarn package manager
- Clone the repository:
git clone https://github.com/ImoutoHeaven/crust-order-status.git
cd crust-file-status-checker- Install dependencies:
npm install
# or
yarn installPre-built binaries are available for the following platforms:
- Linux (ARM64)
- Linux (x64)
- Windows (x64)
Download the appropriate binary for your platform from the releases page.
To compile the application into standalone binaries:
- Install development dependencies:
npm install
# or
yarn install- Build the binaries:
npm run build
# or
yarn buildThis will create executables in the dist directory for the following platforms:
crust-file-status-checker-linux-arm64crust-file-status-checker-linux-x64crust-file-status-checker-win-x64.exe
Each line in the input should follow this format:
FILE_NAME FILE_CID FILE_SIZE_IN_BYTES
Example:
example.txt QmXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 1234567
Options:
--input <path> Path to input text file
--out <path> Path to output log file
--save-log <boolean> Whether to save log file (true/false)
--min-replicas-count <number> Minimum replicas count (default: 3)
--save-log-mode <mode> Log save mode: 'default' or 'table2' (default: 'default')
node index.js
# or if using binary
./crust-file-status-checkernode index.js --input input.txt --save-log true
# or if using binary
./crust-file-status-checker --input input.txt --save-log trueThe tool generates two tables:
Contains complete information for all files:
- FILE_NAME
- FILE_CID
- FILE_SIZE
- FILE_ONCHAIN_STATUS
- FILE_REPLICAS
Contains files that either:
- Are not successfully stored
- Have fewer replicas than the minimum requirement
Includes both Table 1 and Table 2 in the output.
Only outputs Table 2, which is useful for identifying files that need attention.
node index.js --input input.txt --save-log-mode table2ISC
- @polkadot/api: Polkadot/Substrate API wrapper
- @crustio/type-definitions: Crust Network type definitions
- commander: Command-line interface
- readline: Interactive input handling