Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
29 lines (22 sloc) 629 Bytes
import { cli } from 'cli-ux'
import { BaseCommand } from '../../base'
export default class ValidatorList extends BaseCommand {
static description = 'List existing Validators'
static flags = {
...BaseCommand.flags,
}
static examples = ['list']
async run() {
this.parse(ValidatorList)
cli.action.start('Fetching Validators')
const validators = await this.kit.contracts.getValidators()
const validatorList = await validators.getRegisteredValidators()
cli.action.stop()
cli.table(validatorList, {
address: {},
name: {},
publicKey: {},
affiliation: {},
})
}
}
You can’t perform that action at this time.