Skip to content

Commit

Permalink
forge fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
ewansheldon committed Dec 20, 2024
1 parent 59c4bd5 commit 9883d6e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
9 changes: 4 additions & 5 deletions contracts/AutoRedemption.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ contract AutoRedemption is AutomationCompatibleInterface, FunctionsClient, Confi
secondsAgo[0] = 0;
secondsAgo[1] = TWAP_INTERVAL;

(int56[] memory tickCumulatives, ) = pool.observe(secondsAgo);
(int56[] memory tickCumulatives,) = pool.observe(secondsAgo);

int56 tickCumulativeDiff = tickCumulatives[0] - tickCumulatives[1];
int24 twapTick = int24(tickCumulativeDiff / int56(int32(TWAP_INTERVAL)));
Expand Down Expand Up @@ -137,13 +137,12 @@ contract AutoRedemption is AutomationCompatibleInterface, FunctionsClient, Confi
uint256 _USDsTargetAmount = calculateUSDsToTargetPrice();
(uint256 _tokenID, address _token) = abi.decode(response, (uint256, address));
bytes memory _collateralToUSDsPath = swapPaths[_token];
ISmartVaultManager.SmartVaultData memory _vaultData = ISmartVaultManager(smartVaultManager).vaultData(_tokenID);
ISmartVaultManager.SmartVaultData memory _vaultData =
ISmartVaultManager(smartVaultManager).vaultData(_tokenID);
if (_USDsTargetAmount > _vaultData.status.minted) _USDsTargetAmount = _vaultData.status.minted;
address _smartVault = _vaultData.status.vaultAddress;
if (_tokenID <= lastLegacyVaultID) {
legacyAutoRedemption(
_smartVault, _token, _collateralToUSDsPath, _USDsTargetAmount
);
legacyAutoRedemption(_smartVault, _token, _collateralToUSDsPath, _USDsTargetAmount);
} else {
address _hypervisor;
if (hypervisorCollaterals[_token] != address(0)) {
Expand Down
4 changes: 2 additions & 2 deletions contracts/uniswap/LiquidityMath.sol
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ library LiquidityMath {
/// @return z The liquidity delta
function addDelta(uint128 x, int128 y) internal pure returns (uint128 z) {
if (y < 0) {
require((z = x - uint128(-y)) < x, 'LS');
require((z = x - uint128(-y)) < x, "LS");
} else {
require((z = x + uint128(y)) >= x, 'LA');
require((z = x + uint128(y)) >= x, "LA");
}
}
}

0 comments on commit 9883d6e

Please sign in to comment.