private string GetErrorDescription(EvmExceptionType evmExceptionType)
        {
            switch (evmExceptionType)
            {
            case EvmExceptionType.None:
                return(null);

            case EvmExceptionType.BadInstruction:
                return("BadInstruction");

            case EvmExceptionType.StackOverflow:
                return("StackOverflow");

            case EvmExceptionType.StackUnderflow:
                return("StackUnderflow");

            case EvmExceptionType.OutOfGas:
                return("OutOfGass");

            case EvmExceptionType.InvalidJumpDestination:
                return("BadJumpDestination");

            case EvmExceptionType.AccessViolation:
                return("AccessViolation");

            case EvmExceptionType.StaticCallViolation:
                return("StaticCallViolation");

            default:
                return("Error");
            }
        }
Exemple #2
0
 public TransactionSubstate(EvmExceptionType exceptionType, bool isTracerConnected)
 {
     Error        = isTracerConnected ? exceptionType.ToString() : SomeError;
     Refund       = 0;
     DestroyList  = _emptyDestroyList;
     Logs         = _emptyLogs;
     ShouldRevert = false;
 }
Exemple #3
0
 public TransactionSubstate(EvmExceptionType exceptionType)
 {
     Error        = exceptionType.ToString();
     Refund       = 0;
     DestroyList  = _emptyDestroyList;
     Logs         = _emptyLogs;
     ShouldRevert = false;
 }
 public void ReportOperationError(EvmExceptionType error)
 {
     for (var index = 0; index < _txTracers.Length; index++)
     {
         var innerTracer = _txTracers[index];
         if (innerTracer.IsTracingInstructions)
         {
             innerTracer.ReportOperationError(error);
         }
     }
 }
Exemple #5
0
 private static string GetErrorDescription(EvmExceptionType evmExceptionType)
 {
     return(evmExceptionType switch
     {
         EvmExceptionType.None => null,
         EvmExceptionType.BadInstruction => "BadInstruction",
         EvmExceptionType.StackOverflow => "StackOverflow",
         EvmExceptionType.StackUnderflow => "StackUnderflow",
         EvmExceptionType.OutOfGas => "OutOfGas",
         EvmExceptionType.InvalidJumpDestination => "BadJumpDestination",
         EvmExceptionType.AccessViolation => "AccessViolation",
         EvmExceptionType.StaticCallViolation => "StaticCallViolation",
         _ => "Error"
     });
 public void ReportOperationError(EvmExceptionType error)
 {
     _traceEntry.Error = GetErrorDescription(error);
 }
Exemple #7
0
 public void ReportOperationError(EvmExceptionType error)
 {
     throw new NotSupportedException();
 }
 public void ReportActionError(EvmExceptionType exceptionType)
 {
     _currentTxTracer.ReportActionError(exceptionType);
 }
 public void ReportOperationError(EvmExceptionType error)
 {
     _currentTxTracer.ReportOperationError(error);
 }
 public void ReportActionError(EvmExceptionType evmExceptionType)
 {
     throw new NotImplementedException();
 }
Exemple #11
0
 public void ReportOperationError(EvmExceptionType error)
 {
 }
 public void ReportActionError(EvmExceptionType exceptionType)
 {
     throw new NotSupportedException();
 }
 public void ReportActionError(EvmExceptionType exceptionType)
 {
     UpdateAdditionalGas(_currentGasAndNesting.Peek().GasLeft);
 }
 public void ReportActionError(EvmExceptionType exceptionType) => throw new OperationCanceledException(ErrorMessage);
 public void ReportActionError(EvmExceptionType exceptionType)
 {
     _currentNestingLevel--;
 }
Exemple #16
0
 public void ReportOperationError(EvmExceptionType error)
 {
     OutOfGas |= error == EvmExceptionType.OutOfGas;
 }
 public void ReportActionError(EvmExceptionType evmExceptionType)
 {
 }
Exemple #18
0
 public void ReportActionError(EvmExceptionType exceptionType) => throw new InvalidOperationException(ErrorMessage);
Exemple #19
0
 public void ReportActionError(EvmExceptionType exceptionType, long gasLeft) =>
 _currentTxTracer.ReportActionError(exceptionType, gasLeft);