-
-
Notifications
You must be signed in to change notification settings - Fork 115
Expand file tree
/
Copy pathlogs.go
More file actions
21 lines (18 loc) · 541 Bytes
/
logs.go
File metadata and controls
21 lines (18 loc) · 541 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/*
* Copyright (c) 2022 Avi Misra
*
* Use of this work is governed by a MIT License.
* You may find a license copy in project root.
*/
package etherscan
// GetLogs gets logs that match "topic" emitted by the specified "address" between the "fromBlock" and "toBlock"
func (c *Client) GetLogs(fromBlock, toBlock int, address, topic string) (logs []Log, err error) {
param := M{
"fromBlock": fromBlock,
"toBlock": toBlock,
"topic0": topic,
"address": address,
}
err = c.call("logs", "getLogs", param, &logs)
return
}