Skip to content

Commit ce97e6b

Browse files
committed
Minor enhancements in Log.java and LogFilter.java
- in LogFilter's toString() method put "topics" value as List, otherwise topics field becomes of string data type - add method getLogData() to class Log - fix typo in method name getTransactionIndex()
1 parent f827dd4 commit ce97e6b

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/bindings/java/in3/eth1/Log.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public int getLogIndex() {
8787
* integer of the transactions index position log was created from. null when
8888
* its pending log.
8989
*/
90-
public int gettTansactionIndex() {
90+
public int getTransactionIndex() {
9191
return JSON.asInt(data.get("transactionIndex"));
9292
}
9393

@@ -132,4 +132,11 @@ public String[] getTopics() {
132132
return data.getStringArray("topics");
133133
}
134134

135+
/*
136+
* data param of Log (contains the non-indexed arguments of the log)
137+
*/
138+
public String getLogData() {
139+
return data.getString("data");
140+
}
141+
135142
}

src/bindings/java/in3/eth1/LogFilter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public String toString() {
118118
if (toBlock >= 0)
119119
JSON.appendKey(sb, "toBlock", "0x" + Long.toHexString(toBlock));
120120
if (topics != null)
121-
JSON.appendKey(sb, "topics", JSON.toJson(topics));
121+
JSON.appendKey(sb, "topics", topics);
122122
if (limit > 0)
123123
JSON.appendKey(sb, "limit", JSON.asString(limit));
124124
if (address != null)

0 commit comments

Comments
 (0)