Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorizer: Fix missing renames #1193

Merged
merged 4 commits into from
Mar 24, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pkg/vault/contracts/TimelockAuthorizer.sol
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ contract TimelockAuthorizer is IAuthorizer, IAuthentication {
/**
* @dev Emitted when an action `actionId` is executed
facuspagnuolo marked this conversation as resolved.
Show resolved Hide resolved
*/
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`
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 pkg/vault/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