diff --git a/foundry/src/SwapExecutionDispatcher.sol b/foundry/src/SwapExecutionDispatcher.sol index 30f335a..99f7743 100644 --- a/foundry/src/SwapExecutionDispatcher.sol +++ b/foundry/src/SwapExecutionDispatcher.sol @@ -22,6 +22,7 @@ contract SwapExecutionDispatcher { mapping(address => bool) public swapExecutors; event ExecutorSet(address indexed executor); + event ExecutorRemoved(address indexed executor); /** * @dev Adds or replaces an approved swap executor contract address if it is a @@ -42,6 +43,7 @@ contract SwapExecutionDispatcher { */ function _removeSwapExecutor(address target) internal { delete swapExecutors[target]; + emit ExecutorRemoved(target); } /** diff --git a/foundry/test/SwapExecutionDispatcher.t.sol b/foundry/test/SwapExecutionDispatcher.t.sol index 635b3a1..c313694 100644 --- a/foundry/test/SwapExecutionDispatcher.t.sol +++ b/foundry/test/SwapExecutionDispatcher.t.sol @@ -33,6 +33,7 @@ contract SwapExecutionDispatcherTest is Constants { SwapExecutionDispatcherExposed dispatcherExposed; event ExecutorSet(address indexed executor); + event ExecutorRemoved(address indexed executor); function setUp() public { uint256 forkBlock = 20673900; @@ -52,6 +53,9 @@ contract SwapExecutionDispatcherTest is Constants { function testRemoveExecutor() public { dispatcherExposed.exposedSetSwapExecutor(DUMMY); + vm.expectEmit(); + // Define the event we expect to be emitted at the next step + emit ExecutorRemoved(DUMMY); dispatcherExposed.exposedRemoveSwapExecutor(DUMMY); assert(dispatcherExposed.swapExecutors(DUMMY) == false); } diff --git a/foundry/test/TychoRouter.t.sol b/foundry/test/TychoRouter.t.sol index 2e808b7..809586f 100644 --- a/foundry/test/TychoRouter.t.sol +++ b/foundry/test/TychoRouter.t.sol @@ -14,7 +14,6 @@ contract TychoRouterTest is TychoRouterTestSetup { bytes32 public constant FUND_RESCUER_ROLE = 0x912e45d663a6f4cc1d0491d8f046e06c616f40352565ea1cdb86a0e1aaefa41b; - event ExecutorSet(address indexed executor); event CallbackVerifierSet(address indexed callbackVerifier); event Withdrawal( address indexed token, uint256 amount, address indexed receiver