File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
ironfish-cli/src/commands/chain Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 4
4
import { BufferUtils } from '@ironfish/sdk'
5
5
import { Args } from '@oclif/core'
6
6
import { IronfishCommand } from '../../../command'
7
- import { RemoteFlags } from '../../../flags'
7
+ import { ColorFlag , ColorFlagKey , RemoteFlags } from '../../../flags'
8
8
import * as ui from '../../../ui'
9
9
10
10
export default class AssetInfo extends IronfishCommand {
11
11
static description = 'show asset information'
12
+ static enableJsonFlag = true
12
13
13
14
static args = {
14
15
id : Args . string ( {
@@ -19,9 +20,10 @@ export default class AssetInfo extends IronfishCommand {
19
20
20
21
static flags = {
21
22
...RemoteFlags ,
23
+ [ ColorFlagKey ] : ColorFlag ,
22
24
}
23
25
24
- async start ( ) : Promise < void > {
26
+ async start ( ) : Promise < unknown > {
25
27
const { args } = await this . parse ( AssetInfo )
26
28
const { id : assetId } = args
27
29
@@ -39,5 +41,7 @@ export default class AssetInfo extends IronfishCommand {
39
41
'Transaction Created' : data . content . createdTransactionHash ,
40
42
} ) ,
41
43
)
44
+
45
+ return data . content
42
46
}
43
47
}
Original file line number Diff line number Diff line change 4
4
import { BufferUtils , CurrencyUtils , TimeUtils } from '@ironfish/sdk'
5
5
import { Args } from '@oclif/core'
6
6
import { IronfishCommand } from '../../../command'
7
+ import { ColorFlag , ColorFlagKey } from '../../../flags'
7
8
import * as ui from '../../../ui'
8
9
9
10
export default class BlockInfo extends IronfishCommand {
@@ -17,6 +18,10 @@ export default class BlockInfo extends IronfishCommand {
17
18
} ) ,
18
19
}
19
20
21
+ static flags = {
22
+ [ ColorFlagKey ] : ColorFlag ,
23
+ }
24
+
20
25
async start ( ) : Promise < unknown > {
21
26
const { args } = await this . parse ( BlockInfo )
22
27
const { search } = args
You can’t perform that action at this time.
0 commit comments