Skip to content

Commit dcf17de

Browse files
author
neo hong
committed
add error type and fix bug which get unrecognized type
1 parent 9f211a9 commit dcf17de

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/main/java/org/tron/walletserver/WalletApi.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1699,8 +1699,10 @@ public static SmartContract.ABI.Entry.EntryType getEntryType(String type) {
16991699
return SmartContract.ABI.Entry.EntryType.Fallback;
17001700
case "receive":
17011701
return SmartContract.ABI.Entry.EntryType.Receive;
1702+
case "error":
1703+
return SmartContract.ABI.Entry.EntryType.Error;
17021704
default:
1703-
return SmartContract.ABI.Entry.EntryType.UNRECOGNIZED;
1705+
return SmartContract.ABI.Entry.EntryType.UnknownEntryType;
17041706
}
17051707
}
17061708

@@ -1716,7 +1718,7 @@ public static SmartContract.ABI.Entry.StateMutabilityType getStateMutability(
17161718
case "payable":
17171719
return SmartContract.ABI.Entry.StateMutabilityType.Payable;
17181720
default:
1719-
return SmartContract.ABI.Entry.StateMutabilityType.UNRECOGNIZED;
1721+
return SmartContract.ABI.Entry.StateMutabilityType.UnknownMutabilityType;
17201722
}
17211723
}
17221724

src/main/protos/core/contract/smart_contract.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ message SmartContract {
1818
Event = 3;
1919
Fallback = 4;
2020
Receive = 5;
21+
Error = 6;
2122
}
2223
message Param {
2324
bool indexed = 1;

0 commit comments

Comments
 (0)