From 7630d77a5337c90bb5dae7865c6d4b708724cdf8 Mon Sep 17 00:00:00 2001 From: Narayan Prusty Date: Wed, 4 Dec 2024 17:18:44 +0530 Subject: [PATCH] fix: added revoke commands --- simulations/vip-384/basesepolia.ts | 10 ++++++---- vips/vip-384/bsctestnet.ts | 12 ++++++++++++ 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/simulations/vip-384/basesepolia.ts b/simulations/vip-384/basesepolia.ts index a2892a31b..17f56e752 100644 --- a/simulations/vip-384/basesepolia.ts +++ b/simulations/vip-384/basesepolia.ts @@ -40,7 +40,7 @@ forking(18695738, async () => { }); describe("Pre-VIP behaviour", async () => { - it("Normal Timelock has default admin role on base sepolia", async () => { + it("Normal Timelock has default admin role on OP sepolia", async () => { const acm = await ethers.getContractAt(ACCESS_CONTROL_MANAGER_ABI, ACM); const hasRole = await acm.hasRole(DEFAULT_ADMIN_ROLE, basesepolia.NORMAL_TIMELOCK); expect(hasRole).equals(true); @@ -49,8 +49,10 @@ forking(18695738, async () => { testForkedNetworkVipCommands("vip384 configures bridge", await vip384(), { callbackAfterExecution: async txResponse => { - await expectEvents(txResponse, [ACCESS_CONTROL_MANAGER_ABI], ["PermissionGranted"], [39]); - await expectEvents(txResponse, [ACMAggregator_ABI], ["GrantPermissionsExecuted"], [1]); + await expectEvents(txResponse, [ACCESS_CONTROL_MANAGER_ABI], ["PermissionGranted"], [233]); + await expectEvents(txResponse, [ACMAggregator_ABI], ["GrantPermissionsExecuted"], [2]); + await expectEvents(txResponse, [ACCESS_CONTROL_MANAGER_ABI], ["PermissionRevoked"], [60]); + await expectEvents(txResponse, [ACMAggregator_ABI], ["RevokePermissionsExecuted"], [1]); }, }); @@ -80,7 +82,7 @@ forking(18695738, async () => { // Check receiving limit expect(await executor.maxDailyReceiveLimit()).equals(100); - expect(await executor.last24HourCommandsReceived()).equals(4); + expect(await executor.last24HourCommandsReceived()).equals(6); // Check function registry const functionSignatures: string[] = [ diff --git a/vips/vip-384/bsctestnet.ts b/vips/vip-384/bsctestnet.ts index 7808b7ea0..f33a0e5af 100644 --- a/vips/vip-384/bsctestnet.ts +++ b/vips/vip-384/bsctestnet.ts @@ -50,6 +50,18 @@ const vip389 = () => { params: [1], dstChainId: LzChainId.basesepolia, }, + { + target: ACM_AGGREGATOR, + signature: "executeGrantPermissions(uint256)", + params: [3], + dstChainId: LzChainId.basesepolia, + }, + { + target: ACM_AGGREGATOR, + signature: "executeRevokePermissions(uint256)", + params: [2], + dstChainId: LzChainId.basesepolia, + }, { target: ACM, signature: "revokeRole(bytes32,address)",