2019-12-09 15:09:23 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"os"
|
|
|
|
|
2020-01-08 19:10:57 +00:00
|
|
|
logging "github.com/ipfs/go-log/v2"
|
2020-06-02 18:12:53 +00:00
|
|
|
"github.com/urfave/cli/v2"
|
2019-12-09 15:09:23 +00:00
|
|
|
|
|
|
|
"github.com/filecoin-project/lotus/build"
|
|
|
|
)
|
|
|
|
|
|
|
|
var log = logging.Logger("lotus-shed")
|
|
|
|
|
|
|
|
func main() {
|
|
|
|
logging.SetLogLevel("*", "INFO")
|
|
|
|
|
|
|
|
local := []*cli.Command{
|
|
|
|
base32Cmd,
|
|
|
|
base16Cmd,
|
2020-04-28 08:41:59 +00:00
|
|
|
bitFieldCmd,
|
2019-12-09 15:09:23 +00:00
|
|
|
keyinfoCmd,
|
2020-08-19 19:18:36 +00:00
|
|
|
jwtCmd,
|
2019-12-13 14:47:21 +00:00
|
|
|
noncefix,
|
2020-01-31 02:13:53 +00:00
|
|
|
bigIntParseCmd,
|
2020-07-23 22:32:28 +00:00
|
|
|
staterootCmd,
|
2020-09-05 03:01:36 +00:00
|
|
|
auditsCmd,
|
2020-04-02 03:27:06 +00:00
|
|
|
importCarCmd,
|
2020-04-15 17:50:46 +00:00
|
|
|
commpToCidCmd,
|
2020-05-07 05:20:17 +00:00
|
|
|
fetchParamCmd,
|
2020-05-20 17:10:35 +00:00
|
|
|
proofsCmd,
|
2020-05-14 23:11:03 +00:00
|
|
|
verifRegCmd,
|
2020-07-22 17:14:45 +00:00
|
|
|
miscCmd,
|
|
|
|
mpoolCmd,
|
2020-08-21 01:10:11 +00:00
|
|
|
genesisVerifyCmd,
|
2020-09-05 00:40:57 +00:00
|
|
|
mathCmd,
|
2020-08-31 23:37:18 +00:00
|
|
|
mpoolStatsCmd,
|
2019-12-09 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
app := &cli.App{
|
|
|
|
Name: "lotus-shed",
|
|
|
|
Usage: "A place for all the lotus tools",
|
2019-12-17 15:26:16 +00:00
|
|
|
Version: build.BuildVersion,
|
2019-12-09 15:09:23 +00:00
|
|
|
Commands: local,
|
2020-03-07 00:46:55 +00:00
|
|
|
Flags: []cli.Flag{
|
|
|
|
&cli.StringFlag{
|
|
|
|
Name: "repo",
|
|
|
|
EnvVars: []string{"LOTUS_PATH"},
|
|
|
|
Hidden: true,
|
|
|
|
Value: "~/.lotus", // TODO: Consider XDG_DATA_HOME
|
|
|
|
},
|
|
|
|
},
|
2019-12-09 15:09:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if err := app.Run(os.Args); err != nil {
|
|
|
|
log.Warnf("%+v", err)
|
|
|
|
os.Exit(1)
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|