Class RevertMessageParser
java.lang.Object
org.fisco.bcos.sdk.transaction.codec.decode.RevertMessageParser
public class RevertMessageParser
extends java.lang.Object
-
Field Summary
Fields Modifier and Type Field Description static FunctionrevertFunctionstatic java.lang.StringRevertMethodstatic java.lang.StringRevertMethodWithHexPrefixstatic java.lang.StringSMRevertMethodstatic java.lang.StringSMRevertMethodWithHexPrefix -
Constructor Summary
Constructors Constructor Description RevertMessageParser() -
Method Summary
Modifier and Type Method Description static booleanhasRevertMessage(java.lang.String status, java.lang.String output)static booleanisOutputStartWithRevertMethod(java.lang.String output)Does output start with the code of the Revert method, If so, the output may be error messagestatic Tuple2<java.lang.Boolean,java.lang.String>tryResolveRevertMessage(java.lang.String status, java.lang.String output)static Tuple2<java.lang.Boolean,java.lang.String>tryResolveRevertMessage(TransactionReceipt receipt)
-
Field Details
-
RevertMethod
public static final java.lang.String RevertMethod- See Also:
- Constant Field Values
-
RevertMethodWithHexPrefix
public static final java.lang.String RevertMethodWithHexPrefix- See Also:
- Constant Field Values
-
SMRevertMethod
public static final java.lang.String SMRevertMethod- See Also:
- Constant Field Values
-
SMRevertMethodWithHexPrefix
public static final java.lang.String SMRevertMethodWithHexPrefix- See Also:
- Constant Field Values
-
revertFunction
-
-
Constructor Details
-
RevertMessageParser
public RevertMessageParser()
-
-
Method Details
-
isOutputStartWithRevertMethod
public static boolean isOutputStartWithRevertMethod(java.lang.String output)Does output start with the code of the Revert method, If so, the output may be error message- Parameters:
output- the string of output- Returns:
- true/false
-
hasRevertMessage
public static boolean hasRevertMessage(java.lang.String status, java.lang.String output)- Parameters:
status- the status of the receiptoutput- the output of the receipt- Returns:
- true/false
-
tryResolveRevertMessage
public static Tuple2<java.lang.Boolean,java.lang.String> tryResolveRevertMessage(java.lang.String status, java.lang.String output)- Parameters:
status- the transaction receipt statusoutput- the output of the transaction receipt- Returns:
- the resolved revert message information
-
tryResolveRevertMessage
public static Tuple2<java.lang.Boolean,java.lang.String> tryResolveRevertMessage(TransactionReceipt receipt)- Parameters:
receipt- the receipt need to be parsed- Returns:
- the resolved revert message information
-