@@ -1265,6 +1265,64 @@ contract ProtocolFeeControllerTest is BaseVaultTest {
1265
1265
);
1266
1266
}
1267
1267
1268
+ function testPoolRegistrationEventsExempt () public {
1269
+ TokenConfig[] memory tokenConfig = new TokenConfig [](2 );
1270
+ tokenConfig[daiIdx].token = IERC20 (dai);
1271
+ tokenConfig[usdcIdx].token = IERC20 (usdc);
1272
+
1273
+ PoolRoleAccounts memory roleAccounts;
1274
+
1275
+ pool = address (deployPoolMock (IVault (address (vault)), "Exempt Pool " , "EXEMPT " ));
1276
+
1277
+ vm.expectEmit ();
1278
+ emit IProtocolFeeController.InitialPoolAggregateSwapFeePercentage (pool, 0 , true );
1279
+
1280
+ vm.expectEmit ();
1281
+ emit IProtocolFeeController.InitialPoolAggregateYieldFeePercentage (pool, 0 , true );
1282
+
1283
+ PoolFactoryMock (poolFactory).registerGeneralTestPool (
1284
+ pool,
1285
+ tokenConfig,
1286
+ 0 ,
1287
+ 365 days,
1288
+ true , // exempt from protocol fees
1289
+ roleAccounts,
1290
+ address (0 )
1291
+ );
1292
+ }
1293
+
1294
+ function testPoolRegistrationEventsNonExempt () public {
1295
+ authorizer.grantRole (
1296
+ feeControllerAuth.getActionId (IProtocolFeeController.setGlobalProtocolSwapFeePercentage.selector ),
1297
+ admin
1298
+ );
1299
+ authorizer.grantRole (
1300
+ feeControllerAuth.getActionId (IProtocolFeeController.setGlobalProtocolYieldFeePercentage.selector ),
1301
+ admin
1302
+ );
1303
+
1304
+ vm.startPrank (admin);
1305
+ feeController.setGlobalProtocolSwapFeePercentage (MAX_PROTOCOL_SWAP_FEE_PCT);
1306
+ feeController.setGlobalProtocolYieldFeePercentage (MAX_PROTOCOL_YIELD_FEE_PCT);
1307
+ vm.stopPrank ();
1308
+
1309
+ TokenConfig[] memory tokenConfig = new TokenConfig [](2 );
1310
+ tokenConfig[daiIdx].token = IERC20 (dai);
1311
+ tokenConfig[usdcIdx].token = IERC20 (usdc);
1312
+
1313
+ PoolRoleAccounts memory roleAccounts;
1314
+
1315
+ pool = address (deployPoolMock (IVault (address (vault)), "Exempt Pool " , "EXEMPT " ));
1316
+
1317
+ vm.expectEmit ();
1318
+ emit IProtocolFeeController.InitialPoolAggregateSwapFeePercentage (pool, MAX_PROTOCOL_SWAP_FEE_PCT, false );
1319
+
1320
+ vm.expectEmit ();
1321
+ emit IProtocolFeeController.InitialPoolAggregateYieldFeePercentage (pool, MAX_PROTOCOL_YIELD_FEE_PCT, false );
1322
+
1323
+ PoolFactoryMock (poolFactory).registerTestPool (pool, tokenConfig);
1324
+ }
1325
+
1268
1326
function _registerPoolWithMaxProtocolFees () internal {
1269
1327
authorizer.grantRole (
1270
1328
feeControllerAuth.getActionId (IProtocolFeeController.setGlobalProtocolSwapFeePercentage.selector ),
0 commit comments