github.com/theQRL/go-zond@v0.2.1/cmd/zvm/internal/t8ntool/flags.go (about) 1 // Copyright 2020 The go-ethereum Authors 2 // This file is part of go-ethereum. 3 // 4 // go-ethereum 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-ethereum 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-ethereum. If not, see <http://www.gnu.org/licenses/>. 16 17 package t8ntool 18 19 import ( 20 "fmt" 21 "strings" 22 23 "github.com/theQRL/go-zond/core/vm" 24 "github.com/theQRL/go-zond/tests" 25 "github.com/urfave/cli/v2" 26 ) 27 28 var ( 29 TraceFlag = &cli.BoolFlag{ 30 Name: "trace", 31 Usage: "Output full trace logs to files <txhash>.jsonl", 32 } 33 TraceEnableMemoryFlag = &cli.BoolFlag{ 34 Name: "trace.memory", 35 Usage: "Enable full memory dump in traces", 36 } 37 TraceDisableStackFlag = &cli.BoolFlag{ 38 Name: "trace.nostack", 39 Usage: "Disable stack output in traces", 40 } 41 TraceEnableReturnDataFlag = &cli.BoolFlag{ 42 Name: "trace.returndata", 43 Usage: "Enable 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 OutputBodyFlag = &cli.StringFlag{ 51 Name: "output.body", 52 Usage: "If set, the RLP of the transactions (block body) will be written to this file.", 53 Value: "", 54 } 55 OutputAllocFlag = &cli.StringFlag{ 56 Name: "output.alloc", 57 Usage: "Determines where to put the `alloc` of the post-state.\n" + 58 "\t`stdout` - into the stdout output\n" + 59 "\t`stderr` - into the stderr output\n" + 60 "\t<file> - into the file <file> ", 61 Value: "alloc.json", 62 } 63 OutputResultFlag = &cli.StringFlag{ 64 Name: "output.result", 65 Usage: "Determines where to put the `result` (stateroot, txroot etc) of the post-state.\n" + 66 "\t`stdout` - into the stdout output\n" + 67 "\t`stderr` - into the stderr output\n" + 68 "\t<file> - into the file <file> ", 69 Value: "result.json", 70 } 71 OutputBlockFlag = &cli.StringFlag{ 72 Name: "output.block", 73 Usage: "Determines where to put the `block` after building.\n" + 74 "\t`stdout` - into the stdout output\n" + 75 "\t`stderr` - into the stderr output\n" + 76 "\t<file> - into the file <file> ", 77 Value: "block.json", 78 } 79 InputAllocFlag = &cli.StringFlag{ 80 Name: "input.alloc", 81 Usage: "`stdin` or file name of where to find the prestate alloc to use.", 82 Value: "alloc.json", 83 } 84 InputEnvFlag = &cli.StringFlag{ 85 Name: "input.env", 86 Usage: "`stdin` or file name of where to find the prestate env to use.", 87 Value: "env.json", 88 } 89 InputTxsFlag = &cli.StringFlag{ 90 Name: "input.txs", 91 Usage: "`stdin` or file name of where to find the transactions to apply. " + 92 "If the file extension is '.rlp', then the data is interpreted as an RLP list of signed transactions." + 93 "The '.rlp' format is identical to the output.body format.", 94 Value: "txs.json", 95 } 96 InputHeaderFlag = &cli.StringFlag{ 97 Name: "input.header", 98 Usage: "`stdin` or file name of where to find the block header to use.", 99 Value: "header.json", 100 } 101 InputWithdrawalsFlag = &cli.StringFlag{ 102 Name: "input.withdrawals", 103 Usage: "`stdin` or file name of where to find the list of withdrawals to use.", 104 } 105 InputTxsRlpFlag = &cli.StringFlag{ 106 Name: "input.txs", 107 Usage: "`stdin` or file name of where to find the transactions list in RLP form.", 108 Value: "txs.rlp", 109 } 110 RewardFlag = &cli.Int64Flag{ 111 Name: "state.reward", 112 Usage: "Mining reward. Set to -1 to disable", 113 Value: 0, 114 } 115 ChainIDFlag = &cli.Int64Flag{ 116 Name: "state.chainid", 117 Usage: "ChainID to use", 118 Value: 1, 119 } 120 ForknameFlag = &cli.StringFlag{ 121 Name: "state.fork", 122 Usage: fmt.Sprintf("Name of ruleset to use."+ 123 "\n\tAvailable forknames:"+ 124 "\n\t %v"+ 125 "\n\tAvailable extra eips:"+ 126 "\n\t %v"+ 127 "\n\tSyntax <forkname>(+ExtraEip)", 128 strings.Join(tests.AvailableForks(), "\n\t "), 129 strings.Join(vm.ActivateableEips(), ", ")), 130 Value: "Shanghai", 131 } 132 VerbosityFlag = &cli.IntFlag{ 133 Name: "verbosity", 134 Usage: "sets the verbosity level", 135 Value: 3, 136 } 137 )