@@ -291,7 +291,7 @@ function shouldBehaveLikeAccessControlAdminRules(errorPrefix, delay, admin, newA
291
291
// possiblty creating false positives (eg. expect revert for incorrect caller but getting it
292
292
// from a badly expected delayed until)
293
293
correctPendingAdmin = newAdmin ;
294
- correctIncreaseTo = ( await time . latest ( ) ) . add ( delay ) . subn ( 1 ) ;
294
+ correctIncreaseTo = ( await time . latest ( ) ) . add ( delay ) . addn ( 1 ) ;
295
295
296
296
await this . accessControl . beginAdminTransfer ( correctPendingAdmin , { from : admin } ) ;
297
297
} ) ;
@@ -341,7 +341,7 @@ function shouldBehaveLikeAccessControlAdminRules(errorPrefix, delay, admin, newA
341
341
let incorrectIncreaseTo ;
342
342
343
343
beforeEach ( async function ( ) {
344
- incorrectIncreaseTo = correctIncreaseTo . addn ( 1 ) ;
344
+ incorrectIncreaseTo = correctIncreaseTo . subn ( 1 ) ;
345
345
} ) ;
346
346
347
347
it ( 'should revert if block.timestamp is equal to delayed until' , async function ( ) {
@@ -353,7 +353,7 @@ function shouldBehaveLikeAccessControlAdminRules(errorPrefix, delay, admin, newA
353
353
} ) ;
354
354
355
355
it ( 'should revert if block.timestamp is less to delayed until' , async function ( ) {
356
- await time . increaseTo ( incorrectIncreaseTo . addn ( 1 ) ) ;
356
+ await time . increaseTo ( incorrectIncreaseTo . subn ( 1 ) ) ;
357
357
await expectRevert (
358
358
this . accessControl . acceptAdminTransfer ( { from : correctPendingAdmin } ) ,
359
359
`${ errorPrefix } : delay must be met and caller must be pending admin` ,
@@ -386,7 +386,7 @@ function shouldBehaveLikeAccessControlAdminRules(errorPrefix, delay, admin, newA
386
386
let from = admin ;
387
387
388
388
beforeEach ( async function ( ) {
389
- correctIncreaseTo = ( await time . latest ( ) ) . add ( delay ) . subn ( 1 ) ;
389
+ correctIncreaseTo = ( await time . latest ( ) ) . add ( delay ) . addn ( 1 ) ;
390
390
await this . accessControl . beginAdminTransfer ( ZERO_ADDRESS , { from } ) ;
391
391
} ) ;
392
392
@@ -436,7 +436,7 @@ function shouldBehaveLikeAccessControlAdminRules(errorPrefix, delay, admin, newA
436
436
let incorrectIncreaseTo ;
437
437
438
438
beforeEach ( async function ( ) {
439
- incorrectIncreaseTo = correctIncreaseTo . addn ( 1 ) ;
439
+ incorrectIncreaseTo = correctIncreaseTo . subn ( 1 ) ;
440
440
} ) ;
441
441
442
442
it ( 'reverts if block.timestamp is equal to delayed until' , async function ( ) {
@@ -448,7 +448,7 @@ function shouldBehaveLikeAccessControlAdminRules(errorPrefix, delay, admin, newA
448
448
} ) ;
449
449
450
450
it ( 'reverts if block.timestamp is less to delayed until' , async function ( ) {
451
- await time . increaseTo ( incorrectIncreaseTo . addn ( 1 ) ) ;
451
+ await time . increaseTo ( incorrectIncreaseTo . subn ( 1 ) ) ;
452
452
await expectRevert (
453
453
this . accessControl . renounceRole ( DEFAULT_ADMIN_ROLE , admin , { from } ) ,
454
454
`${ errorPrefix } : admin can only renounce in two delayed steps` ,
0 commit comments