Skip to content

Commit 866f914

Browse files
authored
Merge pull request #5 from yfwss/develop
fixbug
2 parents 8317185 + 3c5c147 commit 866f914

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

logs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,6 @@ func (c *Client) GetLogs(address string, fromBlock string, toBlock string, topic
99
"topic0": topic0,
1010
}
1111
compose(param, "address", address)
12-
err = c.call("logs", "getLogs", param, logs)
12+
err = c.call("logs", "getLogs", param, &logs)
1313
return
1414
}

response.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ type Log struct {
150150
// but not secured by consensus.
151151
// block in which the transaction was included
152152
BlockNumber string `json:"blockNumber"`
153+
TimeStamp string `json:"timeStamp"`
153154
GasPrice string `json:"gasPrice"`
154155
GasUsed string `json:"gasUsed"`
155-
TimeStamp string `json:"timeStamp"`
156+
// index of the log in the block
157+
Index string `json:"logIndex"`
156158
// hash of the transaction
157159
TxHash string `json:"transactionHash"`
158160
// index of the transaction in the block
159161
TxIndex string `json:"transactionIndex"`
160-
// index of the log in the block
161-
Index string `json:"logIndex"`
162162
}

0 commit comments

Comments
 (0)