File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed
java/org/tron/walletserver Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -1693,6 +1693,8 @@ public static SmartContract.ABI.Entry.EntryType getEntryType(String type) {
16931693 return SmartContract .ABI .Entry .EntryType .Event ;
16941694 case "fallback" :
16951695 return SmartContract .ABI .Entry .EntryType .Fallback ;
1696+ case "receive" :
1697+ return SmartContract .ABI .Entry .EntryType .Receive ;
16961698 default :
16971699 return SmartContract .ABI .Entry .EntryType .UNRECOGNIZED ;
16981700 }
@@ -1767,11 +1769,12 @@ public static SmartContract.ABI jsonStr2ABI(String jsonStr) {
17671769 System .out .println ("No type!" );
17681770 return null ;
17691771 }
1770- if (!type .equalsIgnoreCase ("fallback" ) && null == inputs ) {
1771- System .out .println ("No inputs!" );
1772- return null ;
1772+ if (inputs == null ) {
1773+ if (!(type .equalsIgnoreCase ("fallback" ) || type .equalsIgnoreCase ("receive" ))) {
1774+ logger .error ("No inputs!" );
1775+ return null ;
1776+ }
17731777 }
1774-
17751778 SmartContract .ABI .Entry .Builder entryBuilder = SmartContract .ABI .Entry .newBuilder ();
17761779 entryBuilder .setAnonymous (anonymous );
17771780 entryBuilder .setConstant (constant );
Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ message SmartContract {
1717 Function = 2 ;
1818 Event = 3 ;
1919 Fallback = 4 ;
20+ Receive = 5 ;
2021 }
2122 message Param {
2223 bool indexed = 1 ;
You can’t perform that action at this time.
0 commit comments