Skip to content

Commit

Permalink
chore - clean console.log/comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dvisacker committed Oct 2, 2024
1 parent 99bb31d commit 3264dc7
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 23 deletions.
3 changes: 0 additions & 3 deletions contracts/script/Exit.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ contract Exit is Script {

AaveLooper looper = AaveLooper(aaveLooper);

console2.log("Supply asset:", supplyAsset);
console2.log("Borrow asset:", borrowAsset);

vm.startBroadcast();
looper.exitPosition(supplyAsset, borrowAsset, 5, 500);
vm.stopBroadcast();
Expand Down
3 changes: 0 additions & 3 deletions contracts/script/ExitWithFlashloan.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ contract ExitWithFlashloan is Script {

AaveLooper looper = AaveLooper(aaveLooper);

console2.log("Supply asset:", supplyAsset);
console2.log("Borrow asset:", borrowAsset);

vm.startBroadcast();
looper.exitPositionWithFlashLoan(supplyAsset, borrowAsset);
vm.stopBroadcast();
Expand Down
7 changes: 0 additions & 7 deletions contracts/script/Leverage.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,8 @@ contract Leverage is Script {
initialAmount = vm.envOr("INITIAL_AMOUNT", uint256(1000000));
iterations = vm.envOr("ITERATIONS", uint256(3));

// address uniswapV3Factory = networkConfig.uniswapV3Factory;

AaveLooper looper = AaveLooper(aaveLooper);

// (uint24 bestFeeTier, uint256 amountOut) =
// looper.getBestFeeTier(uniswapV3Factory, supplyAsset, borrowAsset, initialAmount);
// console2.log("Best fee tier:", bestFeeTier);
// console2.log("Amount out:", amountOut);

vm.startBroadcast();
ERC20(supplyAsset).approve(aaveLooper, initialAmount);
uint256 liquidity = looper.enterPosition(supplyAsset, borrowAsset, initialAmount, iterations, 500);
Expand Down
3 changes: 0 additions & 3 deletions contracts/script/Repay.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ contract Repay is Script {

AaveLooper looper = AaveLooper(aaveLooper);

console2.log("Supply asset:", supplyAsset);
console2.log("Borrow asset:", borrowAsset);

vm.startBroadcast();
looper._repayBorrow(borrowAsset, 1);
vm.stopBroadcast();
Expand Down
3 changes: 0 additions & 3 deletions contracts/script/Withdraw.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ contract ExitWithFlashloan is Script {

AaveLooper looper = AaveLooper(aaveLooper);

console2.log("Supply asset:", supplyAsset);
console2.log("Borrow asset:", borrowAsset);

vm.startBroadcast();
looper.exitPositionWithFlashLoan(supplyAsset, borrowAsset);
vm.stopBroadcast();
Expand Down
4 changes: 0 additions & 4 deletions contracts/src/AaveLooper.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import {IPoolAddressesProvider} from "../lib/aave-v3-core/contracts/interfaces/I
import {IUniswapV3Pool} from "../lib/v3-core/contracts/interfaces/IUniswapV3Pool.sol";
import {IUniswapV3Factory} from "../lib/v3-core/contracts/interfaces/IUniswapV3Factory.sol";
import "./ImmutableOwnable.sol";
import {console2} from "forge-std/console2.sol";

interface ISwapRouter {
struct ExactInputSingleParams {
Expand Down Expand Up @@ -307,9 +306,6 @@ contract AaveLooper is ImmutableOwnable {
(, uint256 totalDebt,,, uint256 ltv,) = getPositionData(); // 4 decimals
uint256 iterations = 0;

console2.log("Total debt:", totalDebt);
console2.log("LTV:", ltv);

while (totalDebt > 10000 && iterations < maxIterations) {
_redeemSupply(supplyAsset, ((getLiquidity(supplyAsset) * 1e4) / ltv) - SAFE_BUFFER);
swapUniswapV3(supplyAsset, borrowAsset, getAssetBalance(supplyAsset), feeTier);
Expand Down

0 comments on commit 3264dc7

Please sign in to comment.