cli: Add lotus-shed cli for computing frc42 method num
This commit is contained in:
parent
33a176eae4
commit
466f0c583f
@ -34,6 +34,7 @@ var actorCmd = &cli.Command{
|
||||
actorControl,
|
||||
actorProposeChangeWorker,
|
||||
actorConfirmChangeWorker,
|
||||
actorGetMethodNum,
|
||||
},
|
||||
}
|
||||
|
||||
@ -809,3 +810,24 @@ var actorConfirmChangeWorker = &cli.Command{
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
||||
var actorGetMethodNum = &cli.Command{
|
||||
Name: "generate-method-num",
|
||||
Usage: "Generate method number from method name",
|
||||
ArgsUsage: "[methodName]",
|
||||
Action: func(cctx *cli.Context) error {
|
||||
if !cctx.Args().Present() {
|
||||
return fmt.Errorf("must pass methodNum")
|
||||
}
|
||||
|
||||
methodName := cctx.Args().First()
|
||||
methodNum, err := builtin.GenerateMethodNum(methodName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
fmt.Println("Method Num: ", methodNum)
|
||||
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user