github.com/theQRL/go-zond@v0.1.1/cmd/evm/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  	TraceDisableMemoryFlag = &cli.BoolFlag{
    34  		Name:  "trace.nomemory",
    35  		Value: true,
    36  		Usage: "Disable full memory dump in traces (deprecated)",
    37  	}
    38  	TraceEnableMemoryFlag = &cli.BoolFlag{
    39  		Name:  "trace.memory",
    40  		Usage: "Enable full memory dump in traces",
    41  	}
    42  	TraceDisableStackFlag = &cli.BoolFlag{
    43  		Name:  "trace.nostack",
    44  		Usage: "Disable stack output in traces",
    45  	}
    46  	TraceDisableReturnDataFlag = &cli.BoolFlag{
    47  		Name:  "trace.noreturndata",
    48  		Value: true,
    49  		Usage: "Disable return data output in traces (deprecated)",
    50  	}
    51  	TraceEnableReturnDataFlag = &cli.BoolFlag{
    52  		Name:  "trace.returndata",
    53  		Usage: "Enable return data output in traces",
    54  	}
    55  	OutputBasedir = &cli.StringFlag{
    56  		Name:  "output.basedir",
    57  		Usage: "Specifies where output files are placed. Will be created if it does not exist.",
    58  		Value: "",
    59  	}
    60  	OutputBodyFlag = &cli.StringFlag{
    61  		Name:  "output.body",
    62  		Usage: "If set, the RLP of the transactions (block body) will be written to this file.",
    63  		Value: "",
    64  	}
    65  	OutputAllocFlag = &cli.StringFlag{
    66  		Name: "output.alloc",
    67  		Usage: "Determines where to put the `alloc` of the post-state.\n" +
    68  			"\t`stdout` - into the stdout output\n" +
    69  			"\t`stderr` - into the stderr output\n" +
    70  			"\t<file> - into the file <file> ",
    71  		Value: "alloc.json",
    72  	}
    73  	OutputResultFlag = &cli.StringFlag{
    74  		Name: "output.result",
    75  		Usage: "Determines where to put the `result` (stateroot, txroot etc) of the post-state.\n" +
    76  			"\t`stdout` - into the stdout output\n" +
    77  			"\t`stderr` - into the stderr output\n" +
    78  			"\t<file> - into the file <file> ",
    79  		Value: "result.json",
    80  	}
    81  	OutputBlockFlag = &cli.StringFlag{
    82  		Name: "output.block",
    83  		Usage: "Determines where to put the `block` after building.\n" +
    84  			"\t`stdout` - into the stdout output\n" +
    85  			"\t`stderr` - into the stderr output\n" +
    86  			"\t<file> - into the file <file> ",
    87  		Value: "block.json",
    88  	}
    89  	InputAllocFlag = &cli.StringFlag{
    90  		Name:  "input.alloc",
    91  		Usage: "`stdin` or file name of where to find the prestate alloc to use.",
    92  		Value: "alloc.json",
    93  	}
    94  	InputEnvFlag = &cli.StringFlag{
    95  		Name:  "input.env",
    96  		Usage: "`stdin` or file name of where to find the prestate env to use.",
    97  		Value: "env.json",
    98  	}
    99  	InputTxsFlag = &cli.StringFlag{
   100  		Name: "input.txs",
   101  		Usage: "`stdin` or file name of where to find the transactions to apply. " +
   102  			"If the file extension is '.rlp', then the data is interpreted as an RLP list of signed transactions." +
   103  			"The '.rlp' format is identical to the output.body format.",
   104  		Value: "txs.json",
   105  	}
   106  	InputHeaderFlag = &cli.StringFlag{
   107  		Name:  "input.header",
   108  		Usage: "`stdin` or file name of where to find the block header to use.",
   109  		Value: "header.json",
   110  	}
   111  	InputOmmersFlag = &cli.StringFlag{
   112  		Name:  "input.ommers",
   113  		Usage: "`stdin` or file name of where to find the list of ommer header RLPs to use.",
   114  	}
   115  	InputWithdrawalsFlag = &cli.StringFlag{
   116  		Name:  "input.withdrawals",
   117  		Usage: "`stdin` or file name of where to find the list of withdrawals to use.",
   118  	}
   119  	InputTxsRlpFlag = &cli.StringFlag{
   120  		Name:  "input.txs",
   121  		Usage: "`stdin` or file name of where to find the transactions list in RLP form.",
   122  		Value: "txs.rlp",
   123  	}
   124  	SealCliqueFlag = &cli.StringFlag{
   125  		Name:  "seal.clique",
   126  		Usage: "Seal block with Clique. `stdin` or file name of where to find the Clique sealing data.",
   127  	}
   128  	RewardFlag = &cli.Int64Flag{
   129  		Name:  "state.reward",
   130  		Usage: "Mining reward. Set to -1 to disable",
   131  		Value: 0,
   132  	}
   133  	ChainIDFlag = &cli.Int64Flag{
   134  		Name:  "state.chainid",
   135  		Usage: "ChainID to use",
   136  		Value: 1,
   137  	}
   138  	ForknameFlag = &cli.StringFlag{
   139  		Name: "state.fork",
   140  		Usage: fmt.Sprintf("Name of ruleset to use."+
   141  			"\n\tAvailable forknames:"+
   142  			"\n\t    %v"+
   143  			"\n\tAvailable extra eips:"+
   144  			"\n\t    %v"+
   145  			"\n\tSyntax <forkname>(+ExtraEip)",
   146  			strings.Join(tests.AvailableForks(), "\n\t    "),
   147  			strings.Join(vm.ActivateableEips(), ", ")),
   148  		Value: "GrayGlacier",
   149  	}
   150  	VerbosityFlag = &cli.IntFlag{
   151  		Name:  "verbosity",
   152  		Usage: "sets the verbosity level",
   153  		Value: 3,
   154  	}
   155  )