github.com/ethereum/go-ethereum@v1.16.1/core/tracing/gen_gas_change_reason_stringer.go (about)

     1  // Code generated by "stringer -type=GasChangeReason -trimprefix=GasChange -output gen_gas_change_reason_stringer.go"; DO NOT EDIT.
     2  
     3  package tracing
     4  
     5  import "strconv"
     6  
     7  func _() {
     8  	// An "invalid array index" compiler error signifies that the constant values have changed.
     9  	// Re-run the stringer command to generate them again.
    10  	var x [1]struct{}
    11  	_ = x[GasChangeUnspecified-0]
    12  	_ = x[GasChangeTxInitialBalance-1]
    13  	_ = x[GasChangeTxIntrinsicGas-2]
    14  	_ = x[GasChangeTxRefunds-3]
    15  	_ = x[GasChangeTxLeftOverReturned-4]
    16  	_ = x[GasChangeCallInitialBalance-5]
    17  	_ = x[GasChangeCallLeftOverReturned-6]
    18  	_ = x[GasChangeCallLeftOverRefunded-7]
    19  	_ = x[GasChangeCallContractCreation-8]
    20  	_ = x[GasChangeCallContractCreation2-9]
    21  	_ = x[GasChangeCallCodeStorage-10]
    22  	_ = x[GasChangeCallOpCode-11]
    23  	_ = x[GasChangeCallPrecompiledContract-12]
    24  	_ = x[GasChangeCallStorageColdAccess-13]
    25  	_ = x[GasChangeCallFailedExecution-14]
    26  	_ = x[GasChangeWitnessContractInit-15]
    27  	_ = x[GasChangeWitnessContractCreation-16]
    28  	_ = x[GasChangeWitnessCodeChunk-17]
    29  	_ = x[GasChangeWitnessContractCollisionCheck-18]
    30  	_ = x[GasChangeTxDataFloor-19]
    31  	_ = x[GasChangeIgnored-255]
    32  }
    33  
    34  const (
    35  	_GasChangeReason_name_0 = "UnspecifiedTxInitialBalanceTxIntrinsicGasTxRefundsTxLeftOverReturnedCallInitialBalanceCallLeftOverReturnedCallLeftOverRefundedCallContractCreationCallContractCreation2CallCodeStorageCallOpCodeCallPrecompiledContractCallStorageColdAccessCallFailedExecutionWitnessContractInitWitnessContractCreationWitnessCodeChunkWitnessContractCollisionCheckTxDataFloor"
    36  	_GasChangeReason_name_1 = "Ignored"
    37  )
    38  
    39  var (
    40  	_GasChangeReason_index_0 = [...]uint16{0, 11, 27, 41, 50, 68, 86, 106, 126, 146, 167, 182, 192, 215, 236, 255, 274, 297, 313, 342, 353}
    41  )
    42  
    43  func (i GasChangeReason) String() string {
    44  	switch {
    45  	case i <= 19:
    46  		return _GasChangeReason_name_0[_GasChangeReason_index_0[i]:_GasChangeReason_index_0[i+1]]
    47  	case i == 255:
    48  		return _GasChangeReason_name_1
    49  	default:
    50  		return "GasChangeReason(" + strconv.FormatInt(int64(i), 10) + ")"
    51  	}
    52  }