Skip to content

Commit

Permalink
emit previous delay
Browse files Browse the repository at this point in the history
  • Loading branch information
proletesseract committed Nov 17, 2023
1 parent d19a6f6 commit 6b7aae1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/root/flowrate/FlowRateWithdrawalQueue.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

/**
Expand Down
7 changes: 3 additions & 4 deletions src/root/flowrate/RootERC20BridgeFlowRate.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 6b7aae1

Please sign in to comment.