@@ -887,8 +887,8 @@ describe('AccessManager', function () {
887
887
shouldBehaveLikeDelayedAdminOperation ( ) ;
888
888
} ) ;
889
889
890
- it ( 'reverts setting grant delay for the PUBLIC_ROLE' , function ( ) {
891
- expect ( this . manager . connect ( this . admin ) . setGrantDelay ( this . roles . PUBLIC . id , 69n ) )
890
+ it ( 'reverts setting grant delay for the PUBLIC_ROLE' , async function ( ) {
891
+ await expect ( this . manager . connect ( this . admin ) . setGrantDelay ( this . roles . PUBLIC . id , 69n ) )
892
892
. to . be . revertedWithCustomError ( this . manager , 'AccessManagerLockedRole' )
893
893
. withArgs ( this . roles . PUBLIC . id ) ;
894
894
} ) ;
@@ -907,7 +907,7 @@ describe('AccessManager', function () {
907
907
it ( 'increases the delay after minsetback' , async function ( ) {
908
908
const txResponse = await this . manager . connect ( this . admin ) . setGrantDelay ( this . role . id , newDelay ) ;
909
909
const setGrantDelayAt = await time . clockFromReceipt . timestamp ( txResponse ) ;
910
- expect ( txResponse )
910
+ await expect ( txResponse )
911
911
. to . emit ( this . manager , 'RoleGrantDelayChanged' )
912
912
. withArgs ( this . role . id , newDelay , setGrantDelayAt + MINSETBACK ) ;
913
913
@@ -933,7 +933,7 @@ describe('AccessManager', function () {
933
933
it ( 'increases the delay after minsetback' , async function ( ) {
934
934
const txResponse = await this . manager . connect ( this . admin ) . setGrantDelay ( this . role . id , newDelay ) ;
935
935
const setGrantDelayAt = await time . clockFromReceipt . timestamp ( txResponse ) ;
936
- expect ( txResponse )
936
+ await expect ( txResponse )
937
937
. to . emit ( this . manager , 'RoleGrantDelayChanged' )
938
938
. withArgs ( this . role . id , newDelay , setGrantDelayAt + MINSETBACK ) ;
939
939
@@ -956,7 +956,7 @@ describe('AccessManager', function () {
956
956
const txResponse = await this . manager . connect ( this . admin ) . setGrantDelay ( this . role . id , newDelay ) ;
957
957
const setGrantDelayAt = await time . clockFromReceipt . timestamp ( txResponse ) ;
958
958
959
- expect ( txResponse )
959
+ await expect ( txResponse )
960
960
. to . emit ( this . manager , 'RoleGrantDelayChanged' )
961
961
. withArgs ( this . role . id , newDelay , setGrantDelayAt + setback ) ;
962
962
@@ -992,7 +992,7 @@ describe('AccessManager', function () {
992
992
it ( 'increases the delay after minsetback' , async function ( ) {
993
993
const txResponse = await this . manager . connect ( this . admin ) . setTargetAdminDelay ( this . other , newDelay ) ;
994
994
const setTargetAdminDelayAt = await time . clockFromReceipt . timestamp ( txResponse ) ;
995
- expect ( txResponse )
995
+ await expect ( txResponse )
996
996
. to . emit ( this . manager , 'TargetAdminDelayUpdated' )
997
997
. withArgs ( this . other , newDelay , setTargetAdminDelayAt + MINSETBACK ) ;
998
998
@@ -1017,7 +1017,7 @@ describe('AccessManager', function () {
1017
1017
it ( 'increases the delay after minsetback' , async function ( ) {
1018
1018
const txResponse = await this . manager . connect ( this . admin ) . setTargetAdminDelay ( this . other , newDelay ) ;
1019
1019
const setTargetAdminDelayAt = await time . clockFromReceipt . timestamp ( txResponse ) ;
1020
- expect ( txResponse )
1020
+ await expect ( txResponse )
1021
1021
. to . emit ( this . manager , 'TargetAdminDelayUpdated' )
1022
1022
. withArgs ( this . other , newDelay , setTargetAdminDelayAt + MINSETBACK ) ;
1023
1023
@@ -1040,7 +1040,7 @@ describe('AccessManager', function () {
1040
1040
const txResponse = await this . manager . connect ( this . admin ) . setTargetAdminDelay ( this . other , newDelay ) ;
1041
1041
const setTargetAdminDelayAt = await time . clockFromReceipt . timestamp ( txResponse ) ;
1042
1042
1043
- expect ( txResponse )
1043
+ await expect ( txResponse )
1044
1044
. to . emit ( this . manager , 'TargetAdminDelayUpdated' )
1045
1045
. withArgs ( this . other , newDelay , setTargetAdminDelayAt + setback ) ;
1046
1046
@@ -1135,7 +1135,7 @@ describe('AccessManager', function () {
1135
1135
. setTargetFunctionRole ( this . target , sigs , this . roles . SOME . id ) ;
1136
1136
1137
1137
for ( const sig of sigs ) {
1138
- expect ( allowRole )
1138
+ await expect ( allowRole )
1139
1139
. to . emit ( this . manager , 'TargetFunctionRoleUpdated' )
1140
1140
. withArgs ( this . target , sig , this . roles . SOME . id ) ;
1141
1141
expect ( await this . manager . getTargetFunctionRole ( this . target , sig ) ) . to . equal ( this . roles . SOME . id ) ;
@@ -1212,9 +1212,9 @@ describe('AccessManager', function () {
1212
1212
1213
1213
it ( 'does not grant role to the user yet' , async function ( ) {
1214
1214
const timestamp = await time . clockFromReceipt . timestamp ( this . txResponse ) ;
1215
- expect ( this . txResponse )
1215
+ await expect ( this . txResponse )
1216
1216
. to . emit ( this . manager , 'RoleGranted' )
1217
- . withArgs ( ANOTHER_ROLE , this . user , timestamp + this . grantDelay , this . executionDelay , true ) ;
1217
+ . withArgs ( ANOTHER_ROLE , this . user , this . executionDelay , timestamp + this . grantDelay , true ) ;
1218
1218
1219
1219
// Access is correctly stored
1220
1220
const access = await this . manager . getAccess ( ANOTHER_ROLE , this . user ) ;
@@ -1237,9 +1237,9 @@ describe('AccessManager', function () {
1237
1237
1238
1238
it ( 'grants role to the user' , async function ( ) {
1239
1239
const timestamp = await time . clockFromReceipt . timestamp ( this . txResponse ) ;
1240
- expect ( this . txResponse )
1241
- . to . emit ( this . manager , 'RoleAccessRequested ' )
1242
- . withArgs ( ANOTHER_ROLE , this . user , timestamp + this . grantDelay , this . executionDelay , true ) ;
1240
+ await expect ( this . txResponse )
1241
+ . to . emit ( this . manager , 'RoleGranted ' )
1242
+ . withArgs ( ANOTHER_ROLE , this . user , this . executionDelay , timestamp + this . grantDelay , true ) ;
1243
1243
1244
1244
// Access is correctly stored
1245
1245
const access = await this . manager . getAccess ( ANOTHER_ROLE , this . user ) ;
@@ -1278,7 +1278,7 @@ describe('AccessManager', function () {
1278
1278
. connect ( this . admin )
1279
1279
. grantRole ( ANOTHER_ROLE , this . user , executionDelay ) ;
1280
1280
const grantedAt = await time . clockFromReceipt . timestamp ( txResponse ) ;
1281
- expect ( txResponse )
1281
+ await expect ( txResponse )
1282
1282
. to . emit ( this . manager , 'RoleGranted' )
1283
1283
. withArgs ( ANOTHER_ROLE , this . user , executionDelay , grantedAt , true ) ;
1284
1284
@@ -1335,9 +1335,9 @@ describe('AccessManager', function () {
1335
1335
. grantRole ( ANOTHER_ROLE , this . user , this . newExecutionDelay ) ;
1336
1336
const timestamp = await time . clockFromReceipt . timestamp ( txResponse ) ;
1337
1337
1338
- expect ( txResponse )
1338
+ await expect ( txResponse )
1339
1339
. to . emit ( this . manager , 'RoleGranted' )
1340
- . withArgs ( ANOTHER_ROLE , this . user , timestamp , this . newExecutionDelay , false ) ;
1340
+ . withArgs ( ANOTHER_ROLE , this . user , this . newExecutionDelay , timestamp , false ) ;
1341
1341
1342
1342
// Access is correctly stored
1343
1343
const access = await this . manager . getAccess ( ANOTHER_ROLE , this . user ) ;
@@ -1370,10 +1370,10 @@ describe('AccessManager', function () {
1370
1370
this . delay = this . previousExecutionDelay - this . newExecutionDelay ; // For testAsDelay
1371
1371
} ) ;
1372
1372
1373
- it ( 'emits event' , function ( ) {
1374
- expect ( this . txResponse )
1373
+ it ( 'emits event' , async function ( ) {
1374
+ await expect ( this . txResponse )
1375
1375
. to . emit ( this . manager , 'RoleGranted' )
1376
- . withArgs ( ANOTHER_ROLE , this . user , this . grantTimestamp + this . delay , this . newExecutionDelay , false ) ;
1376
+ . withArgs ( ANOTHER_ROLE , this . user , this . newExecutionDelay , this . grantTimestamp + this . delay , false ) ;
1377
1377
} ) ;
1378
1378
1379
1379
testAsDelay ( 'execution delay effect' , {
@@ -1446,9 +1446,9 @@ describe('AccessManager', function () {
1446
1446
. grantRole ( ANOTHER_ROLE , this . user , this . newExecutionDelay ) ;
1447
1447
const timestamp = await time . clockFromReceipt . timestamp ( txResponse ) ;
1448
1448
1449
- expect ( txResponse )
1449
+ await expect ( txResponse )
1450
1450
. to . emit ( this . manager , 'RoleGranted' )
1451
- . withArgs ( ANOTHER_ROLE , this . user , timestamp , this . newExecutionDelay , false ) ;
1451
+ . withArgs ( ANOTHER_ROLE , this . user , this . newExecutionDelay , timestamp , false ) ;
1452
1452
1453
1453
// Access is correctly stored
1454
1454
const access = await this . manager . getAccess ( ANOTHER_ROLE , this . user ) ;
@@ -1481,10 +1481,10 @@ describe('AccessManager', function () {
1481
1481
this . delay = this . previousExecutionDelay - this . newExecutionDelay ; // For testAsDelay
1482
1482
} ) ;
1483
1483
1484
- it ( 'emits event' , function ( ) {
1485
- expect ( this . txResponse )
1484
+ it ( 'emits event' , async function ( ) {
1485
+ await expect ( this . txResponse )
1486
1486
. to . emit ( this . manager , 'RoleGranted' )
1487
- . withArgs ( ANOTHER_ROLE , this . user , this . grantTimestamp + this . delay , this . newExecutionDelay , false ) ;
1487
+ . withArgs ( ANOTHER_ROLE , this . user , this . newExecutionDelay , this . grantTimestamp + this . delay , false ) ;
1488
1488
} ) ;
1489
1489
1490
1490
testAsDelay ( 'execution delay effect' , {
@@ -1871,9 +1871,9 @@ describe('AccessManager', function () {
1871
1871
const txResponse = await schedule ( ) ;
1872
1872
1873
1873
expect ( await this . manager . getSchedule ( operationId ) ) . to . equal ( scheduledAt + this . delay ) ;
1874
- expect ( txResponse )
1874
+ await expect ( txResponse )
1875
1875
. to . emit ( this . manager , 'OperationScheduled' )
1876
- . withArgs ( operationId , '1' , scheduledAt + this . delay , this . target , this . calldata ) ;
1876
+ . withArgs ( operationId , '1' , scheduledAt + this . delay , this . caller , this . target , this . calldata ) ;
1877
1877
} ) ;
1878
1878
1879
1879
it ( 'schedules an operation at the minimum execution date if no specified execution date (when == 0)' , async function ( ) {
@@ -1886,9 +1886,9 @@ describe('AccessManager', function () {
1886
1886
const operationId = await this . manager . hashOperation ( this . caller , this . target , this . calldata ) ;
1887
1887
1888
1888
expect ( await this . manager . getSchedule ( operationId ) ) . to . equal ( scheduledAt + executionDelay ) ;
1889
- expect ( txResponse )
1889
+ await expect ( txResponse )
1890
1890
. to . emit ( this . manager , 'OperationScheduled' )
1891
- . withArgs ( operationId , '1' , scheduledAt + executionDelay , this . target , this . calldata ) ;
1891
+ . withArgs ( operationId , '1' , scheduledAt + executionDelay , this . caller , this . target , this . calldata ) ;
1892
1892
} ) ;
1893
1893
1894
1894
it ( 'increases the nonce of an operation scheduled more than once' , async function ( ) {
0 commit comments