@@ -342,12 +342,12 @@ contract('MainModule', (accounts: string[]) => {
342
342
describe ( 'Using non-encoded nonce' , ( ) => {
343
343
it ( 'Should default to space zero' , async ( ) => {
344
344
await wallet . sendTransactions ( [ { } ] )
345
- expect ( await wallet . mainModule . nonce ( ) ) . to . equal ( 1 )
345
+ expect ( await wallet . mainModule . nonce ( ) ) . to . equal ( 1n )
346
346
} )
347
347
348
348
it ( 'Should work with zero as initial nonce' , async ( ) => {
349
349
await wallet . sendTransactions ( [ { } ] )
350
- expect ( await wallet . mainModule . readNonce ( 0 ) ) . to . equal ( 1 )
350
+ expect ( await wallet . mainModule . readNonce ( 0 ) ) . to . equal ( 1n )
351
351
} )
352
352
353
353
it ( 'Should emit NonceChange event' , async ( ) => {
@@ -388,7 +388,7 @@ contract('MainModule', (accounts: string[]) => {
388
388
describe ( `using ${ ethers . toBeHex ( space ) } space` , ( ) => {
389
389
it ( 'Should work with zero as initial nonce' , async ( ) => {
390
390
await wallet . sendTransactions ( [ { } ] , encodeNonce ( space , 0 ) )
391
- expect ( await wallet . mainModule . readNonce ( space ) ) . to . equal ( 1 )
391
+ expect ( await wallet . mainModule . readNonce ( space ) ) . to . equal ( 1n )
392
392
} )
393
393
394
394
it ( 'Should emit NonceChange event' , async ( ) => {
@@ -416,7 +416,7 @@ contract('MainModule', (accounts: string[]) => {
416
416
await wallet . sendTransactions ( [ { } ] , encodeNonce ( space , 0 ) )
417
417
await wallet . sendTransactions ( [ { } ] , encodeNonce ( space , 1 ) )
418
418
419
- expect ( await wallet . mainModule . readNonce ( space ) ) . to . equal ( 2 )
419
+ expect ( await wallet . mainModule . readNonce ( space ) ) . to . equal ( 2n )
420
420
} )
421
421
422
422
it ( 'Should fail if nonce did not change' , async ( ) => {
@@ -449,18 +449,18 @@ contract('MainModule', (accounts: string[]) => {
449
449
it ( 'Should keep separated nonce counts' , async ( ) => {
450
450
await wallet . sendTransactions ( [ { } ] , encodeNonce ( 1 , 0 ) )
451
451
452
- expect ( await wallet . mainModule . readNonce ( 1 ) ) . to . equal ( 1 )
453
- expect ( await wallet . mainModule . readNonce ( 2 ) ) . to . equal ( 0 )
452
+ expect ( await wallet . mainModule . readNonce ( 1 ) ) . to . equal ( 1n )
453
+ expect ( await wallet . mainModule . readNonce ( 2 ) ) . to . equal ( 0n )
454
454
455
455
await wallet . sendTransactions ( [ { } ] , encodeNonce ( 2 , 0 ) )
456
456
457
- expect ( await wallet . mainModule . readNonce ( 1 ) ) . to . equal ( 1 )
458
- expect ( await wallet . mainModule . readNonce ( 2 ) ) . to . equal ( 1 )
457
+ expect ( await wallet . mainModule . readNonce ( 1 ) ) . to . equal ( 1n )
458
+ expect ( await wallet . mainModule . readNonce ( 2 ) ) . to . equal ( 1n )
459
459
await wallet . sendTransactions ( [ { } ] , encodeNonce ( 2 , 1 ) )
460
460
await wallet . sendTransactions ( [ { } ] , encodeNonce ( 2 , 2 ) )
461
461
462
- expect ( await wallet . mainModule . readNonce ( 1 ) ) . to . equal ( 1 )
463
- expect ( await wallet . mainModule . readNonce ( 2 ) ) . to . equal ( 3 )
462
+ expect ( await wallet . mainModule . readNonce ( 1 ) ) . to . equal ( 1n )
463
+ expect ( await wallet . mainModule . readNonce ( 2 ) ) . to . equal ( 3n )
464
464
} )
465
465
466
466
it ( 'Should emit different events' , async ( ) => {
0 commit comments