Skip to content

Commit 17380e4

Browse files
authored
Merge pull request sebs#14 from vicnaum/patch-1
getLogs fixed
2 parents 8f3f98a + c10bf76 commit 17380e4

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/init.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,22 +81,22 @@ module.exports = function (apiKey, chain) {
8181
topic2_3_opr,
8282
topic3) {
8383

84-
const module = 'log';
84+
const module = 'logs';
8585
const action = 'getLogs';
8686
var params = {
8787
module, action, apiKey, address
8888
};
8989

90-
if (toBlock) {
91-
params.tolock = toBlock;
90+
if (address) {
91+
params.address = address;
9292
}
9393

9494
if (fromBlock) {
9595
params.fromBlock = fromBlock;
9696
}
9797

9898
if (toBlock) {
99-
params.tolock = toBlock;
99+
params.toBlock = toBlock;
100100
}
101101

102102
if (topic0) {

0 commit comments

Comments
 (0)