chang HashMap to LinkedHashMap for decode event
@@ -6,6 +6,7 @@ import com.fasterxml.jackson.databind.type.CollectionType;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
+import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
@@ -67,7 +68,7 @@ public class TransactionDecoder {
List<ResultEntity> resultList = decodeInputReturnObject(input);
// format result to json
- Map<String, Object> resultMap = new HashMap<>();
+ Map<String, Object> resultMap = new LinkedHashMap<>();
String methodSign = decodeMethodSign(abiFunc);
resultMap.put("function", methodSign);
resultMap.put("methodID", FunctionEncoder.buildMethodId(methodSign));
@@ -201,7 +202,7 @@ public class TransactionDecoder {
throws BaseException, IOException {
// set result to java bean
- Map<String, List<List<ResultEntity>>> resultEntityMap = new HashMap<>();
+ Map<String, List<List<ResultEntity>>> resultEntityMap = new LinkedHashMap<>();
for (Log log : logList) {
Tuple2<AbiDefinition, List<ResultEntity>> resultTuple2 = decodeEventReturnObject(log);
