Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
saucepoint committed Dec 11, 2023
1 parent 3437a91 commit 6a7dc18
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
4 changes: 0 additions & 4 deletions forge-test/NoOpSwap.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ contract NoOpSwapTest is HookTest {

function test_noOp() public {
assertEq(hook.beforeSwapCount(poolId), 0);
assertEq(hook.afterSwapCount(poolId), 0);

// Perform a test swap //
int256 amount = 69e18;
Expand All @@ -64,12 +63,10 @@ contract NoOpSwapTest is HookTest {

// Swapping with 69e18 will skip the swap logic!
assertEq(hook.beforeSwapCount(poolId), 0);
assertEq(hook.afterSwapCount(poolId), 0);
}

function test_swap() public {
assertEq(hook.beforeSwapCount(poolId), 0);
assertEq(hook.afterSwapCount(poolId), 0);

// Perform a test swap //
int256 amount = 1e18;
Expand All @@ -80,6 +77,5 @@ contract NoOpSwapTest is HookTest {
assertEq(int256(swapDelta.amount0()), amount);

assertEq(hook.beforeSwapCount(poolId), 1);
assertEq(hook.afterSwapCount(poolId), 1);
}
}
1 change: 0 additions & 1 deletion src/pages/hooks/no-op/NoOpSwap.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ contract NoOpSwap is BaseHook {
using PoolIdLibrary for PoolKey;

mapping(PoolId => uint256 count) public beforeSwapCount;
mapping(PoolId => uint256 count) public afterSwapCount;

constructor(IPoolManager _poolManager) BaseHook(_poolManager) {}

Expand Down

0 comments on commit 6a7dc18

Please sign in to comment.