chore: export state cli commands

This commit is contained in:
frrist 2021-03-23 16:21:04 -07:00
parent 8f6ea05d48
commit 22329b96b4
2 changed files with 46 additions and 46 deletions

View File

@ -73,7 +73,7 @@ var Commands = []*cli.Command{
WithCategory("basic", paychCmd), WithCategory("basic", paychCmd),
WithCategory("developer", authCmd), WithCategory("developer", authCmd),
WithCategory("developer", mpoolCmd), WithCategory("developer", mpoolCmd),
WithCategory("developer", stateCmd), WithCategory("developer", StateCmd),
WithCategory("developer", ChainCmd), WithCategory("developer", ChainCmd),
WithCategory("developer", LogCmd), WithCategory("developer", LogCmd),
WithCategory("developer", waitApiCmd), WithCategory("developer", waitApiCmd),

View File

@ -41,7 +41,7 @@ import (
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
) )
var stateCmd = &cli.Command{ var StateCmd = &cli.Command{
Name: "state", Name: "state",
Usage: "Interact with and query filecoin chain state", Usage: "Interact with and query filecoin chain state",
Flags: []cli.Flag{ Flags: []cli.Flag{
@ -51,32 +51,32 @@ var stateCmd = &cli.Command{
}, },
}, },
Subcommands: []*cli.Command{ Subcommands: []*cli.Command{
statePowerCmd, StatePowerCmd,
stateSectorsCmd, StateSectorsCmd,
stateActiveSectorsCmd, StateActiveSectorsCmd,
stateListActorsCmd, StateListActorsCmd,
stateListMinersCmd, StateListMinersCmd,
stateCircSupplyCmd, StateCircSupplyCmd,
stateSectorCmd, StateSectorCmd,
stateGetActorCmd, StateGetActorCmd,
stateLookupIDCmd, StateLookupIDCmd,
stateReplayCmd, StateReplayCmd,
stateSectorSizeCmd, StateSectorSizeCmd,
stateReadStateCmd, StateReadStateCmd,
stateListMessagesCmd, StateListMessagesCmd,
stateComputeStateCmd, StateComputeStateCmd,
stateCallCmd, StateCallCmd,
stateGetDealSetCmd, StateGetDealSetCmd,
stateWaitMsgCmd, StateWaitMsgCmd,
stateSearchMsgCmd, StateSearchMsgCmd,
stateMinerInfo, StateMinerInfo,
stateMarketCmd, StateMarketCmd,
stateExecTraceCmd, StateExecTraceCmd,
stateNtwkVersionCmd, StateNtwkVersionCmd,
}, },
} }
var stateMinerInfo = &cli.Command{ var StateMinerInfo = &cli.Command{
Name: "miner-info", Name: "miner-info",
Usage: "Retrieve miner information", Usage: "Retrieve miner information",
ArgsUsage: "[minerAddress]", ArgsUsage: "[minerAddress]",
@ -219,7 +219,7 @@ func ParseTipSetRef(ctx context.Context, api api.FullNode, tss string) (*types.T
return ts, nil return ts, nil
} }
var statePowerCmd = &cli.Command{ var StatePowerCmd = &cli.Command{
Name: "power", Name: "power",
Usage: "Query network or miner power", Usage: "Query network or miner power",
ArgsUsage: "[<minerAddress> (optional)]", ArgsUsage: "[<minerAddress> (optional)]",
@ -263,7 +263,7 @@ var statePowerCmd = &cli.Command{
}, },
} }
var stateSectorsCmd = &cli.Command{ var StateSectorsCmd = &cli.Command{
Name: "sectors", Name: "sectors",
Usage: "Query the sector set of a miner", Usage: "Query the sector set of a miner",
ArgsUsage: "[minerAddress]", ArgsUsage: "[minerAddress]",
@ -303,7 +303,7 @@ var stateSectorsCmd = &cli.Command{
}, },
} }
var stateActiveSectorsCmd = &cli.Command{ var StateActiveSectorsCmd = &cli.Command{
Name: "active-sectors", Name: "active-sectors",
Usage: "Query the active sector set of a miner", Usage: "Query the active sector set of a miner",
ArgsUsage: "[minerAddress]", ArgsUsage: "[minerAddress]",
@ -343,7 +343,7 @@ var stateActiveSectorsCmd = &cli.Command{
}, },
} }
var stateExecTraceCmd = &cli.Command{ var StateExecTraceCmd = &cli.Command{
Name: "exec-trace", Name: "exec-trace",
Usage: "Get the execution trace of a given message", Usage: "Get the execution trace of a given message",
ArgsUsage: "<messageCid>", ArgsUsage: "<messageCid>",
@ -411,7 +411,7 @@ var stateExecTraceCmd = &cli.Command{
}, },
} }
var stateReplayCmd = &cli.Command{ var StateReplayCmd = &cli.Command{
Name: "replay", Name: "replay",
Usage: "Replay a particular message", Usage: "Replay a particular message",
ArgsUsage: "<messageCid>", ArgsUsage: "<messageCid>",
@ -476,7 +476,7 @@ var stateReplayCmd = &cli.Command{
}, },
} }
var stateGetDealSetCmd = &cli.Command{ var StateGetDealSetCmd = &cli.Command{
Name: "get-deal", Name: "get-deal",
Usage: "View on-chain deal info", Usage: "View on-chain deal info",
ArgsUsage: "[dealId]", ArgsUsage: "[dealId]",
@ -518,7 +518,7 @@ var stateGetDealSetCmd = &cli.Command{
}, },
} }
var stateListMinersCmd = &cli.Command{ var StateListMinersCmd = &cli.Command{
Name: "list-miners", Name: "list-miners",
Usage: "list all miners in the network", Usage: "list all miners in the network",
Flags: []cli.Flag{ Flags: []cli.Flag{
@ -590,7 +590,7 @@ func getDealsCounts(ctx context.Context, lapi api.FullNode) (map[address.Address
return out, nil return out, nil
} }
var stateListActorsCmd = &cli.Command{ var StateListActorsCmd = &cli.Command{
Name: "list-actors", Name: "list-actors",
Usage: "list all actors in the network", Usage: "list all actors in the network",
Action: func(cctx *cli.Context) error { Action: func(cctx *cli.Context) error {
@ -620,7 +620,7 @@ var stateListActorsCmd = &cli.Command{
}, },
} }
var stateGetActorCmd = &cli.Command{ var StateGetActorCmd = &cli.Command{
Name: "get-actor", Name: "get-actor",
Usage: "Print actor information", Usage: "Print actor information",
ArgsUsage: "[actorrAddress]", ArgsUsage: "[actorrAddress]",
@ -664,7 +664,7 @@ var stateGetActorCmd = &cli.Command{
}, },
} }
var stateLookupIDCmd = &cli.Command{ var StateLookupIDCmd = &cli.Command{
Name: "lookup", Name: "lookup",
Usage: "Find corresponding ID address", Usage: "Find corresponding ID address",
ArgsUsage: "[address]", ArgsUsage: "[address]",
@ -715,7 +715,7 @@ var stateLookupIDCmd = &cli.Command{
}, },
} }
var stateSectorSizeCmd = &cli.Command{ var StateSectorSizeCmd = &cli.Command{
Name: "sector-size", Name: "sector-size",
Usage: "Look up miners sector size", Usage: "Look up miners sector size",
ArgsUsage: "[minerAddress]", ArgsUsage: "[minerAddress]",
@ -752,7 +752,7 @@ var stateSectorSizeCmd = &cli.Command{
}, },
} }
var stateReadStateCmd = &cli.Command{ var StateReadStateCmd = &cli.Command{
Name: "read-state", Name: "read-state",
Usage: "View a json representation of an actors state", Usage: "View a json representation of an actors state",
ArgsUsage: "[actorAddress]", ArgsUsage: "[actorAddress]",
@ -794,7 +794,7 @@ var stateReadStateCmd = &cli.Command{
}, },
} }
var stateListMessagesCmd = &cli.Command{ var StateListMessagesCmd = &cli.Command{
Name: "list-messages", Name: "list-messages",
Usage: "list messages on chain matching given criteria", Usage: "list messages on chain matching given criteria",
Flags: []cli.Flag{ Flags: []cli.Flag{
@ -907,7 +907,7 @@ var stateListMessagesCmd = &cli.Command{
}, },
} }
var stateComputeStateCmd = &cli.Command{ var StateComputeStateCmd = &cli.Command{
Name: "compute-state", Name: "compute-state",
Usage: "Perform state computations", Usage: "Perform state computations",
Flags: []cli.Flag{ Flags: []cli.Flag{
@ -1365,7 +1365,7 @@ func jsonReturn(code cid.Cid, method abi.MethodNum, ret []byte) (string, error)
return string(b), err return string(b), err
} }
var stateWaitMsgCmd = &cli.Command{ var StateWaitMsgCmd = &cli.Command{
Name: "wait-msg", Name: "wait-msg",
Usage: "Wait for a message to appear on chain", Usage: "Wait for a message to appear on chain",
ArgsUsage: "[messageCid]", ArgsUsage: "[messageCid]",
@ -1407,7 +1407,7 @@ var stateWaitMsgCmd = &cli.Command{
}, },
} }
var stateSearchMsgCmd = &cli.Command{ var StateSearchMsgCmd = &cli.Command{
Name: "search-msg", Name: "search-msg",
Usage: "Search to see whether a message has appeared on chain", Usage: "Search to see whether a message has appeared on chain",
ArgsUsage: "[messageCid]", ArgsUsage: "[messageCid]",
@ -1484,7 +1484,7 @@ func printMsg(ctx context.Context, api api.FullNode, msg cid.Cid, mw *lapi.MsgLo
return nil return nil
} }
var stateCallCmd = &cli.Command{ var StateCallCmd = &cli.Command{
Name: "call", Name: "call",
Usage: "Invoke a method on an actor locally", Usage: "Invoke a method on an actor locally",
ArgsUsage: "[toAddress methodId <param1 param2 ...> (optional)]", ArgsUsage: "[toAddress methodId <param1 param2 ...> (optional)]",
@ -1692,7 +1692,7 @@ func parseParamsForMethod(act cid.Cid, method uint64, args []string) ([]byte, er
return buf.Bytes(), nil return buf.Bytes(), nil
} }
var stateCircSupplyCmd = &cli.Command{ var StateCircSupplyCmd = &cli.Command{
Name: "circulating-supply", Name: "circulating-supply",
Usage: "Get the exact current circulating supply of Filecoin", Usage: "Get the exact current circulating supply of Filecoin",
Flags: []cli.Flag{ Flags: []cli.Flag{
@ -1741,7 +1741,7 @@ var stateCircSupplyCmd = &cli.Command{
}, },
} }
var stateSectorCmd = &cli.Command{ var StateSectorCmd = &cli.Command{
Name: "sector", Name: "sector",
Usage: "Get miner sector info", Usage: "Get miner sector info",
ArgsUsage: "[miner address] [sector number]", ArgsUsage: "[miner address] [sector number]",
@ -1815,7 +1815,7 @@ var stateSectorCmd = &cli.Command{
}, },
} }
var stateMarketCmd = &cli.Command{ var StateMarketCmd = &cli.Command{
Name: "market", Name: "market",
Usage: "Inspect the storage market actor", Usage: "Inspect the storage market actor",
Subcommands: []*cli.Command{ Subcommands: []*cli.Command{
@ -1861,7 +1861,7 @@ var stateMarketBalanceCmd = &cli.Command{
}, },
} }
var stateNtwkVersionCmd = &cli.Command{ var StateNtwkVersionCmd = &cli.Command{
Name: "network-version", Name: "network-version",
Usage: "Returns the network version", Usage: "Returns the network version",
Action: func(cctx *cli.Context) error { Action: func(cctx *cli.Context) error {