@@ -108,7 +108,7 @@ export default class SemaphoreViem {
108108 const { address, startBlock } = getDeployedContract ( networkOrEthereumURL as SupportedNetwork )
109109
110110 options . address ??= address
111- options . startBlock ??= BigInt ( startBlock || 0 )
111+ options . startBlock ??= BigInt ( startBlock )
112112 } else {
113113 options . startBlock ??= 0n
114114 }
@@ -244,7 +244,7 @@ export default class SemaphoreViem {
244244 abi : SemaphoreABI ,
245245 eventName : "MemberRemoved" ,
246246 args : {
247- groupId
247+ groupId : BigInt ( groupId )
248248 } ,
249249 fromBlock : BigInt ( this . _options . startBlock || 0 )
250250 } ) ) as MemberRemovedLog [ ]
@@ -255,7 +255,7 @@ export default class SemaphoreViem {
255255 abi : SemaphoreABI ,
256256 eventName : "MemberUpdated" ,
257257 args : {
258- groupId
258+ groupId : BigInt ( groupId )
259259 } ,
260260 fromBlock : BigInt ( this . _options . startBlock || 0 )
261261 } ) ) as MemberUpdatedLog [ ]
@@ -287,7 +287,7 @@ export default class SemaphoreViem {
287287 abi : SemaphoreABI ,
288288 eventName : "MembersAdded" ,
289289 args : {
290- groupId
290+ groupId : BigInt ( groupId )
291291 } ,
292292 fromBlock : BigInt ( this . _options . startBlock || 0 )
293293 } ) ) as MembersAddedLog [ ]
@@ -309,7 +309,7 @@ export default class SemaphoreViem {
309309 abi : SemaphoreABI ,
310310 eventName : "MemberAdded" ,
311311 args : {
312- groupId
312+ groupId : BigInt ( groupId )
313313 } ,
314314 fromBlock : BigInt ( this . _options . startBlock || 0 )
315315 } ) ) as MemberAddedLog [ ]
@@ -328,12 +328,10 @@ export default class SemaphoreViem {
328328 index += identityCommitments . length
329329 } else {
330330 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 )
332332
333333 if ( event && event . args . identityCommitment ) {
334334 members . push ( event . args . identityCommitment . toString ( ) )
335- } else {
336- members . push ( "0" ) // Placeholder for missing member
337335 }
338336
339337 index += 1
@@ -372,7 +370,7 @@ export default class SemaphoreViem {
372370 abi : SemaphoreABI ,
373371 eventName : "ProofValidated" ,
374372 args : {
375- groupId
373+ groupId : BigInt ( groupId )
376374 } ,
377375 fromBlock : BigInt ( this . _options . startBlock || 0 )
378376 } ) ) as ProofValidatedLog [ ]
0 commit comments