clicommands

package
v1.28.0-rc4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 5, 2024 License: Apache-2.0, MIT Imports: 4 Imported by: 0

Documentation

Overview

Package clicommands contains only the cli.Command definitions that are common to sptool and miner. These are here because they can't be referenced in cli/spcli or cli/ because of the import cycle with all the other cli functions.

Index

Constants

This section is empty.

Variables

View Source
var StateCmd = &cli.Command{
	Name:  "state",
	Usage: "Interact with and query filecoin chain state",
	Flags: []cli.Flag{
		&cli.StringFlag{
			Name:  "tipset",
			Usage: "specify tipset to call method on (pass comma separated array of cids)",
		},
	},
	Subcommands: []*cli.Command{
		lcli.StatePowerCmd,
		lcli.StateSectorsCmd,
		lcli.StateActiveSectorsCmd,
		lcli.StateListActorsCmd,
		lcli.StateListMinersCmd,
		lcli.StateCircSupplyCmd,
		lcli.StateSectorCmd,
		lcli.StateGetActorCmd,
		lcli.StateLookupIDCmd,
		lcli.StateReplayCmd,
		lcli.StateSectorSizeCmd,
		lcli.StateReadStateCmd,
		lcli.StateListMessagesCmd,
		lcli.StateComputeStateCmd,
		lcli.StateCallCmd,
		lcli.StateGetDealSetCmd,
		lcli.StateWaitMsgCmd,
		lcli.StateSearchMsgCmd,
		StateMinerInfo,
		lcli.StateMarketCmd,
		lcli.StateExecTraceCmd,
		lcli.StateNtwkVersionCmd,
		lcli.StateMinerProvingDeadlineCmd,
		lcli.StateSysActorCIDsCmd,
	},
}
View Source
var StateMinerInfo = &cli.Command{
	Name:      "miner-info",
	Usage:     "Retrieve miner information",
	ArgsUsage: "[minerAddress]",
	Action: func(cctx *cli.Context) error {
		addressGetter := func(_ *cli.Context) (address.Address, error) {
			if cctx.NArg() != 1 {
				return address.Address{}, lcli.IncorrectNumArgs(cctx)
			}

			return address.NewFromString(cctx.Args().First())
		}
		err := spcli.InfoCmd(addressGetter).Action(cctx)
		if err != nil {
			return err
		}
		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL