@@ -108,7 +108,7 @@ export default class SemaphoreViem {
108
108
const { address, startBlock } = getDeployedContract ( networkOrEthereumURL as SupportedNetwork )
109
109
110
110
options . address ??= address
111
- options . startBlock ??= BigInt ( startBlock || 0 )
111
+ options . startBlock ??= BigInt ( startBlock )
112
112
} else {
113
113
options . startBlock ??= 0n
114
114
}
@@ -244,7 +244,7 @@ export default class SemaphoreViem {
244
244
abi : SemaphoreABI ,
245
245
eventName : "MemberRemoved" ,
246
246
args : {
247
- groupId
247
+ groupId : BigInt ( groupId )
248
248
} ,
249
249
fromBlock : BigInt ( this . _options . startBlock || 0 )
250
250
} ) ) as MemberRemovedLog [ ]
@@ -255,7 +255,7 @@ export default class SemaphoreViem {
255
255
abi : SemaphoreABI ,
256
256
eventName : "MemberUpdated" ,
257
257
args : {
258
- groupId
258
+ groupId : BigInt ( groupId )
259
259
} ,
260
260
fromBlock : BigInt ( this . _options . startBlock || 0 )
261
261
} ) ) as MemberUpdatedLog [ ]
@@ -287,7 +287,7 @@ export default class SemaphoreViem {
287
287
abi : SemaphoreABI ,
288
288
eventName : "MembersAdded" ,
289
289
args : {
290
- groupId
290
+ groupId : BigInt ( groupId )
291
291
} ,
292
292
fromBlock : BigInt ( this . _options . startBlock || 0 )
293
293
} ) ) as MembersAddedLog [ ]
@@ -309,7 +309,7 @@ export default class SemaphoreViem {
309
309
abi : SemaphoreABI ,
310
310
eventName : "MemberAdded" ,
311
311
args : {
312
- groupId
312
+ groupId : BigInt ( groupId )
313
313
} ,
314
314
fromBlock : BigInt ( this . _options . startBlock || 0 )
315
315
} ) ) as MemberAddedLog [ ]
@@ -328,12 +328,10 @@ export default class SemaphoreViem {
328
328
index += identityCommitments . length
329
329
} else {
330
330
const currentIndex = index // Create a closure to capture the current index value
331
- const event = memberAddedEvents . find ( ( e ) => e . args . index && Number ( e . args . index ) === currentIndex )
331
+ const event = memberAddedEvents . find ( ( e ) => Number ( e . args . index ) === currentIndex )
332
332
333
333
if ( event && event . args . identityCommitment ) {
334
334
members . push ( event . args . identityCommitment . toString ( ) )
335
- } else {
336
- members . push ( "0" ) // Placeholder for missing member
337
335
}
338
336
339
337
index += 1
@@ -372,7 +370,7 @@ export default class SemaphoreViem {
372
370
abi : SemaphoreABI ,
373
371
eventName : "ProofValidated" ,
374
372
args : {
375
- groupId
373
+ groupId : BigInt ( groupId )
376
374
} ,
377
375
fromBlock : BigInt ( this . _options . startBlock || 0 )
378
376
} ) ) as ProofValidatedLog [ ]
0 commit comments