From 15d52051149b527ecd8ccba98c8f14754dcfdfb8 Mon Sep 17 00:00:00 2001 From: Facu Spagnuolo Date: Wed, 23 Mar 2022 15:28:43 -0300 Subject: [PATCH 1/2] authorizer: fix missing renames --- pkg/vault/contracts/TimelockAuthorizer.sol | 8 ++++---- pkg/vault/test/TimelockAuthorizer.test.ts | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pkg/vault/contracts/TimelockAuthorizer.sol b/pkg/vault/contracts/TimelockAuthorizer.sol index ccbfd1f218..b48aa94079 100644 --- a/pkg/vault/contracts/TimelockAuthorizer.sol +++ b/pkg/vault/contracts/TimelockAuthorizer.sol @@ -74,12 +74,12 @@ contract TimelockAuthorizer is IAuthorizer, IAuthentication { /** * @dev Emitted when an action `actionId` is executed */ - event ActionExecuted(uint256 indexed scheduledExecutionId); + event ExecutionExecuted(uint256 indexed scheduledExecutionId); /** * @dev Emitted when an action `actionId` is cancelled */ - event ActionCancelled(uint256 indexed scheduledExecutionId); + event ExecutionCancelled(uint256 indexed scheduledExecutionId); /** * @dev Emitted when a new `delay` is set in order to perform action `actionId` @@ -218,7 +218,7 @@ contract TimelockAuthorizer is IAuthorizer, IAuthentication { scheduledExecution.executed = true; result = scheduledExecution.where.functionCall(scheduledExecution.data); - emit ActionExecuted(scheduledExecutionId); + emit ExecutionExecuted(scheduledExecutionId); } /** @@ -237,7 +237,7 @@ contract TimelockAuthorizer is IAuthorizer, IAuthentication { _require(hasPermission(actionId, msg.sender, scheduledExecution.where), Errors.SENDER_NOT_ALLOWED); scheduledExecution.cancelled = true; - emit ActionCancelled(scheduledExecutionId); + emit ExecutionCancelled(scheduledExecutionId); } /** diff --git a/pkg/vault/test/TimelockAuthorizer.test.ts b/pkg/vault/test/TimelockAuthorizer.test.ts index 47ab443e01..dd1f4f0e13 100644 --- a/pkg/vault/test/TimelockAuthorizer.test.ts +++ b/pkg/vault/test/TimelockAuthorizer.test.ts @@ -917,7 +917,7 @@ describe('TimelockAuthorizer', () => { await advanceTime(delay); const receipt = await authorizer.execute(id); - expectEvent.inReceipt(await receipt.wait(), 'ActionExecuted', { scheduledExecutionId: id }); + expectEvent.inReceipt(await receipt.wait(), 'ExecutionExecuted', { scheduledExecutionId: id }); const scheduledExecution = await authorizer.scheduledExecutions(id); expect(scheduledExecution.executed).to.be.true; @@ -964,7 +964,7 @@ describe('TimelockAuthorizer', () => { await expect(authorizer.execute(id, { from: grantee })).to.be.revertedWith('SENDER_NOT_ALLOWED'); const receipt = await authorizer.execute(id, { from: executors[0] }); - expectEvent.inReceipt(await receipt.wait(), 'ActionExecuted', { scheduledExecutionId: id }); + expectEvent.inReceipt(await receipt.wait(), 'ExecutionExecuted', { scheduledExecutionId: id }); const scheduledExecution = await authorizer.scheduledExecutions(id); expect(scheduledExecution.executed).to.be.true; @@ -1086,7 +1086,7 @@ describe('TimelockAuthorizer', () => { it('emits an event', async () => { const receipt = await authorizer.execute(id, { from }); - expectEvent.inReceipt(await receipt.wait(), 'ActionExecuted', { scheduledExecutionId: id }); + expectEvent.inReceipt(await receipt.wait(), 'ExecutionExecuted', { scheduledExecutionId: id }); }); it('cannot be executed twice', async () => { @@ -1197,7 +1197,7 @@ describe('TimelockAuthorizer', () => { it('emits an event', async () => { const receipt = await authorizer.cancel(id, { from }); - expectEvent.inReceipt(await receipt.wait(), 'ActionCancelled', { scheduledExecutionId: id }); + expectEvent.inReceipt(await receipt.wait(), 'ExecutionCancelled', { scheduledExecutionId: id }); }); it('cannot be cancelled twice', async () => { From 25fd7017cca10dc045df0067369a2a1c5d68e600 Mon Sep 17 00:00:00 2001 From: Facu Spagnuolo Date: Wed, 23 Mar 2022 18:40:56 -0300 Subject: [PATCH 2/2] authorizer: fix missing renames --- pkg/vault/contracts/TimelockAuthorizer.sol | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/vault/contracts/TimelockAuthorizer.sol b/pkg/vault/contracts/TimelockAuthorizer.sol index b48aa94079..bf69bec8ad 100644 --- a/pkg/vault/contracts/TimelockAuthorizer.sol +++ b/pkg/vault/contracts/TimelockAuthorizer.sol @@ -67,17 +67,17 @@ contract TimelockAuthorizer is IAuthorizer, IAuthentication { mapping(bytes32 => uint256) public delaysPerActionId; /** - * @dev Emitted when a new action `actionId` is scheduled + * @dev Emitted when a new execution `scheduledExecutionId` is scheduled */ event ExecutionScheduled(bytes32 indexed actionId, uint256 indexed scheduledExecutionId); /** - * @dev Emitted when an action `actionId` is executed + * @dev Emitted when an execution `scheduledExecutionId` is executed */ event ExecutionExecuted(uint256 indexed scheduledExecutionId); /** - * @dev Emitted when an action `actionId` is cancelled + * @dev Emitted when an execution `scheduledExecutionId` is cancelled */ event ExecutionCancelled(uint256 indexed scheduledExecutionId);