From 6b7aae1c94b5f8847077617b4fef2a313cb4c933 Mon Sep 17 00:00:00 2001 From: Craig M Date: Fri, 17 Nov 2023 16:18:21 +1300 Subject: [PATCH] emit previous delay --- src/root/flowrate/FlowRateWithdrawalQueue.sol | 5 +++-- src/root/flowrate/RootERC20BridgeFlowRate.sol | 7 +++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/root/flowrate/FlowRateWithdrawalQueue.sol b/src/root/flowrate/FlowRateWithdrawalQueue.sol index d06d562e..1f63eb20 100644 --- a/src/root/flowrate/FlowRateWithdrawalQueue.sol +++ b/src/root/flowrate/FlowRateWithdrawalQueue.sol @@ -66,7 +66,7 @@ abstract contract FlowRateWithdrawalQueue { ); // Indicates that the new withdrawal delay. - event WithdrawalDelayUpdated(uint256 delay); + event WithdrawalDelayUpdated(uint256 delay, uint256 previousDelay); // // A withdrawal was being processed, but the index is outside of the array. error IndexOutsideWithdrawalQueue(uint256 lengthOfQueue, uint256 requestedIndex); @@ -95,8 +95,9 @@ abstract contract FlowRateWithdrawalQueue { * @param delay Withdrawal delay in seconds. */ function _setWithdrawalDelay(uint256 delay) internal { + uint256 previousDelay = withdrawalDelay; withdrawalDelay = delay; - emit WithdrawalDelayUpdated(delay); + emit WithdrawalDelayUpdated(delay, previousDelay); } /** diff --git a/src/root/flowrate/RootERC20BridgeFlowRate.sol b/src/root/flowrate/RootERC20BridgeFlowRate.sol index 500333e7..057b3abf 100644 --- a/src/root/flowrate/RootERC20BridgeFlowRate.sol +++ b/src/root/flowrate/RootERC20BridgeFlowRate.sol @@ -100,9 +100,8 @@ contract RootERC20BridgeFlowRate is /** * @notice Set the time in the queue for queued withdrawals. - * @param delay The number of seconds between when the ExitHelper is called to - * complete a crosschain transfer and when finaliseHeldTransfers can be - * called. + * @param delay The number of seconds between when the AxelarAdapter is called to + * complete a crosschain transfer. * @dev Only RATE role. * NOTE: There is no range checking on delay. Delay could be inadvertently be set to * a very large value, representing a large delay. If this is done, the withdrawal @@ -172,7 +171,7 @@ contract RootERC20BridgeFlowRate is * - withdrawer: Account that initiated the transfer on the child chain. * - receiver: Account to transfer tokens to. * - amount: The number of tokens to transfer. - * @dev Called by the ExitHelper. + * @dev Called by the AxelarAdapter. * Only when not paused. */ function _withdraw(bytes memory data) internal override {