Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
31 lines (23 sloc) 929 Bytes
import { IArg } from '@oclif/parser/lib/args'
import { BaseCommand } from '../../base'
import { newCheckBuilder } from '../../utils/checks'
import { printValueMap } from '../../utils/cli'
import { Args } from '../../utils/command'
export default class ValidatorShow extends BaseCommand {
static description = 'Show information about an existing Validator'
static flags = {
...BaseCommand.flags,
}
static args: IArg[] = [Args.address('validatorAddress', { description: "Validator's address" })]
static examples = ['show 0x97f7333c51897469E8D98E7af8653aAb468050a3']
async run() {
const { args } = this.parse(ValidatorShow)
const address = args.validatorAddress
const validators = await this.kit.contracts.getValidators()
await newCheckBuilder(this)
.isValidator(address)
.runChecks()
const validator = await validators.getValidator(address)
printValueMap(validator)
}
}
You can’t perform that action at this time.