Пример #1
0
        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");
            }
        }
Пример #2
0
 public TransactionSubstate(EvmExceptionType exceptionType, bool isTracerConnected)
 {
     Error        = isTracerConnected ? exceptionType.ToString() : SomeError;
     Refund       = 0;
     DestroyList  = _emptyDestroyList;
     Logs         = _emptyLogs;
     ShouldRevert = false;
 }
Пример #3
0
 public TransactionSubstate(EvmExceptionType exceptionType)
 {
     Error        = exceptionType.ToString();
     Refund       = 0;
     DestroyList  = _emptyDestroyList;
     Logs         = _emptyLogs;
     ShouldRevert = false;
 }
Пример #4
0
 public void ReportOperationError(EvmExceptionType error)
 {
     for (var index = 0; index < _txTracers.Length; index++)
     {
         var innerTracer = _txTracers[index];
         if (innerTracer.IsTracingInstructions)
         {
             innerTracer.ReportOperationError(error);
         }
     }
 }
Пример #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"
     });
Пример #6
0
 public void ReportOperationError(EvmExceptionType error)
 {
     _traceEntry.Error = GetErrorDescription(error);
 }
Пример #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);
 }
Пример #10
0
 public void ReportActionError(EvmExceptionType evmExceptionType)
 {
     throw new NotImplementedException();
 }
Пример #11
0
 public void ReportOperationError(EvmExceptionType error)
 {
 }
Пример #12
0
 public void ReportActionError(EvmExceptionType exceptionType)
 {
     throw new NotSupportedException();
 }
Пример #13
0
 public void ReportActionError(EvmExceptionType exceptionType)
 {
     UpdateAdditionalGas(_currentGasAndNesting.Peek().GasLeft);
 }
Пример #14
0
 public void ReportActionError(EvmExceptionType exceptionType) => throw new OperationCanceledException(ErrorMessage);
Пример #15
0
 public void ReportActionError(EvmExceptionType exceptionType)
 {
     _currentNestingLevel--;
 }
Пример #16
0
 public void ReportOperationError(EvmExceptionType error)
 {
     OutOfGas |= error == EvmExceptionType.OutOfGas;
 }
 public void ReportActionError(EvmExceptionType evmExceptionType)
 {
 }
Пример #18
0
 public void ReportActionError(EvmExceptionType exceptionType) => throw new InvalidOperationException(ErrorMessage);
Пример #19
0
 public void ReportActionError(EvmExceptionType exceptionType, long gasLeft) =>
 _currentTxTracer.ReportActionError(exceptionType, gasLeft);