Skip to content

Commit a69e744

Browse files
committed
Compose the params
1 parent 8379755 commit a69e744

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

logs.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ func (c *Client) GetLogs(fromBlock, toBlock *int, address *string, topicsOrOps .
2121
return nil, fmt.Errorf("cannot provide more than 4 topics")
2222
}
2323

24-
param := M{
25-
"fromBlock": fromBlock,
26-
"toBlock": toBlock,
27-
"address": address,
28-
}
24+
param := M{}
25+
compose(param, "fromBlock", fromBlock)
26+
compose(param, "toBlock", toBlock)
27+
compose(param, "address", address)
2928

3029
// Not all the operators are supported (https://docs.etherscan.io/api-endpoints/logs).
3130
// Only operator in between topics are supported.

0 commit comments

Comments
 (0)