github.com/core-coin/go-core/v2@v2.1.9/cmd/cvm/internal/t8ntool/flags.go (about) 1 // Copyright 2020 by the Authors 2 // This file is part of go-core. 3 // 4 // go-core is free software: you can redistribute it and/or modify 5 // it under the terms of the GNU General Public License as published by 6 // the Free Software Foundation, either version 3 of the License, or 7 // (at your option) any later version. 8 // 9 // go-core is distributed in the hope that it will be useful, 10 // but WITHOUT ANY WARRANTY; without even the implied warranty of 11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 // GNU General Public License for more details. 13 // 14 // You should have received a copy of the GNU General Public License 15 // along with go-core. If not, see <http://www.gnu.org/licenses/>. 16 17 package t8ntool 18 19 import ( 20 "fmt" 21 "strings" 22 23 "gopkg.in/urfave/cli.v1" 24 25 "github.com/core-coin/go-core/v2/tests" 26 ) 27 28 var ( 29 TraceFlag = cli.BoolFlag{ 30 Name: "trace", 31 Usage: "Output full trace logs to files <txhash>.jsonl", 32 } 33 TraceDisableMemoryFlag = cli.BoolFlag{ 34 Name: "trace.nomemory", 35 Usage: "Disable full memory dump in traces", 36 } 37 TraceDisableStackFlag = cli.BoolFlag{ 38 Name: "trace.nostack", 39 Usage: "Disable stack output in traces", 40 } 41 TraceDisableReturnDataFlag = cli.BoolFlag{ 42 Name: "trace.noreturndata", 43 Usage: "Disable return data output in traces", 44 } 45 OutputBasedir = cli.StringFlag{ 46 Name: "output.basedir", 47 Usage: "Specifies where output files are placed. Will be created if it does not exist.", 48 Value: "", 49 } 50 OutputAllocFlag = cli.StringFlag{ 51 Name: "output.alloc", 52 Usage: "Determines where to put the `alloc` of the post-state.\n" + 53 "\t`stdout` - into the stdout output\n" + 54 "\t`stderr` - into the stderr output\n" + 55 "\t<file> - into the file <file> ", 56 Value: "alloc.json", 57 } 58 OutputResultFlag = cli.StringFlag{ 59 Name: "output.result", 60 Usage: "Determines where to put the `result` (stateroot, txroot etc) of the post-state.\n" + 61 "\t`stdout` - into the stdout output\n" + 62 "\t`stderr` - into the stderr output\n" + 63 "\t<file> - into the file <file> ", 64 Value: "result.json", 65 } 66 InputAllocFlag = cli.StringFlag{ 67 Name: "input.alloc", 68 Usage: "`stdin` or file name of where to find the prestate alloc to use.", 69 Value: "alloc.json", 70 } 71 InputEnvFlag = cli.StringFlag{ 72 Name: "input.env", 73 Usage: "`stdin` or file name of where to find the prestate env to use.", 74 Value: "env.json", 75 } 76 InputTxsFlag = cli.StringFlag{ 77 Name: "input.txs", 78 Usage: "`stdin` or file name of where to find the transactions to apply.", 79 Value: "txs.json", 80 } 81 RewardFlag = cli.Int64Flag{ 82 Name: "state.reward", 83 Usage: "Mining reward. Set to -1 to disable", 84 Value: 0, 85 } 86 NetworkIDFlag = cli.Int64Flag{ 87 Name: "state.networkid", 88 Usage: "NetworkID to use", 89 Value: 1, 90 } 91 ForknameFlag = cli.StringFlag{ 92 Name: "state.fork", 93 Usage: fmt.Sprintf("Name of ruleset to use." + 94 "\n\tAvailable forknames:" + 95 "\n\t %v" + 96 "\n\tAvailable extra cips:" + 97 "\n\t %v" + 98 strings.Join(tests.AvailableForks(), "\n\t ")), 99 Value: "Nucleus", 100 } 101 VerbosityFlag = cli.IntFlag{ 102 Name: "verbosity", 103 Usage: "sets the verbosity level", 104 Value: 3, 105 } 106 )