-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
45 lines (41 loc) · 946 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package main
import (
"fmt"
"log"
"os"
"github.com/bxue-l2/srs-verification/parser"
"github.com/bxue-l2/srs-verification/verifier"
"github.com/urfave/cli"
)
func main() {
app := &cli.App{
Commands: []cli.Command{
{
Name: "verify",
Aliases: []string{"v"},
Usage: "verify if the parsed SRS are consistent",
Action: func(cCtx *cli.Context) error {
config := verifier.ReadCLIConfig(cCtx)
verifier.VerifySRS(config)
return nil
},
Flags: verifier.Flags,
},
{
Name: "parse",
Aliases: []string{"p"},
Usage: "parse data from ptau challenge file into EigenDA SRS format",
Flags: parser.Flags,
Action: func(cCtx *cli.Context) error {
config := parser.ReadCLIConfig(cCtx)
fmt.Printf("config %v\n", config.PtauPath)
parser.ParsePtauChallenge(config)
return nil
},
},
},
}
if err := app.Run(os.Args); err != nil {
log.Fatal(err)
}
}