Skip to content

Commit

Permalink
Authorizer: Fix missing renames (balancer#1193)
Browse files Browse the repository at this point in the history
* authorizer: fix missing renames

* authorizer: fix missing renames
  • Loading branch information
facuspagnuolo authored Mar 24, 2022
1 parent 8b57738 commit 457223f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions contracts/TimelockAuthorizer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,19 +67,19 @@ 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 ActionExecuted(uint256 indexed scheduledExecutionId);
event ExecutionExecuted(uint256 indexed scheduledExecutionId);

/**
* @dev Emitted when an action `actionId` is cancelled
* @dev Emitted when an execution `scheduledExecutionId` 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`
Expand Down Expand Up @@ -218,7 +218,7 @@ contract TimelockAuthorizer is IAuthorizer, IAuthentication {

scheduledExecution.executed = true;
result = scheduledExecution.where.functionCall(scheduledExecution.data);
emit ActionExecuted(scheduledExecutionId);
emit ExecutionExecuted(scheduledExecutionId);
}

/**
Expand All @@ -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);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions test/TimelockAuthorizer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 () => {
Expand Down Expand Up @@ -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 () => {
Expand Down

0 comments on commit 457223f

Please sign in to comment.