Skip to content

Commit

Permalink
test: add WETH, fix wrong constructor param for DFMM
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak committed Feb 27, 2024
1 parent 8004319 commit 7c62c99
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/test/helpers/SetUp.sol
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ pragma solidity ^0.8.13;
import "forge-std/Test.sol";
import { MockERC20 } from "solmate/test/utils/mocks/MockERC20.sol";
import { DFMM } from "src/DFMM.sol";
import { WETH } from "solmate/tokens/WETH.sol";
import { IDFMM } from "src/interfaces/IDFMM.sol";
import { LPToken } from "src/LPToken.sol";
import { Lex } from "src/test/helpers/Lex.sol";
Expand All @@ -13,7 +14,7 @@ contract SetUp is Test {
Lex lex;
MockERC20 tokenX;
MockERC20 tokenY;
LPToken lpTokenImplementation;
WETH weth;

uint256 public constant TEST_SWAP_FEE = 0.003 ether;

Expand All @@ -24,8 +25,8 @@ contract SetUp is Test {
tokenY.mint(address(this), 100e18);

lex = new Lex(address(tokenX), address(tokenY), 1 ether);
LPToken lpToken = new LPToken();
dfmm = new DFMM(address(lpToken));
weth = new WETH();
dfmm = new DFMM(address(weth));

tokenX.approve(address(dfmm), type(uint256).max);
tokenY.approve(address(dfmm), type(uint256).max);
Expand All @@ -39,4 +40,8 @@ contract SetUp is Test {
IDFMM.Pool memory pool = dfmm.getPool(poolId);
return pool.liquidityToken;
}

function skip() public {
vm.skip(true);
}
}

0 comments on commit 7c62c99

Please sign in to comment.