github.com/kisexp/xdchain@v0.0.0-20211206025815-490d6b732aa7/cmd/evm/internal/t8ntool/flags.go (about)

     1  // Copyright 2020 The go-ethereum Authors
     2  // This file is part of the go-ethereum library.
     3  //
     4  // The go-ethereum library is free software: you can redistribute it and/or modify
     5  // it under the terms of the GNU Lesser 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  // The go-ethereum library 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 Lesser General Public License for more details.
    13  //
    14  // You should have received a copy of the GNU Lesser General Public License
    15  // along with the go-ethereum library. If not, see <http://www.gnu.org/licenses/>.
    16  
    17  package t8ntool
    18  
    19  import (
    20  	"fmt"
    21  	"strings"
    22  
    23  	"github.com/kisexp/xdchain/core/vm"
    24  	"github.com/kisexp/xdchain/tests"
    25  	"gopkg.in/urfave/cli.v1"
    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  	ChainIDFlag = cli.Int64Flag{
    87  		Name:  "state.chainid",
    88  		Usage: "ChainID 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 eips:"+
    97  			"\n\t    %v"+
    98  			"\n\tSyntax <forkname>(+ExtraEip)",
    99  			strings.Join(tests.AvailableForks(), "\n\t    "),
   100  			strings.Join(vm.ActivateableEips(), ", ")),
   101  		Value: "Istanbul",
   102  	}
   103  	VerbosityFlag = cli.IntFlag{
   104  		Name:  "verbosity",
   105  		Usage: "sets the verbosity level",
   106  		Value: 3,
   107  	}
   108  )