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