()
| 27 | } |
| 28 | |
| 29 | func init() { |
| 30 | rootCmd.PersistentFlags().BoolP("use-storage", "s", false, "Use stateful read/write storage during compression.") |
| 31 | rootCmd.PersistentFlags().StringP("provider", "p", "", "Ethereum RPC provider URL.") |
| 32 | rootCmd.PersistentFlags().StringP("contract", "c", "", "Contract address of the decompressor contract.") |
| 33 | rootCmd.PersistentFlags().String("cache-dir", "/tmp/czip-cache", "Path to the cache dir for indexes.") |
| 34 | rootCmd.MarkFlagsRequiredTogether("provider", "contract") |
| 35 | |
| 36 | rootCmd.PersistentFlags().StringSlice("allow-opcodes", []string{}, "Will only encode using these operations, separated by commas.") |
| 37 | rootCmd.PersistentFlags().StringSlice("disallow-opcodes", []string{}, "Will not encode using these operations, separated by commas.") |
| 38 | rootCmd.MarkFlagsMutuallyExclusive("allow-opcodes", "disallow-opcodes") |
| 39 | |
| 40 | rootCmd.AddCommand(encodeAnyCmd) |
| 41 | rootCmd.AddCommand(extrasCmd) |
| 42 | |
| 43 | addEncodeCallCommands(rootCmd) |
| 44 | addEncodeCallsCommands(rootCmd) |
| 45 | addEncodeSequenceCommands(rootCmd) |
| 46 | } |
| 47 | |
| 48 | func fail(err error) { |
| 49 | fmt.Print("Error: ") |
nothing calls this directly
no test coverage detected