new deployment with public position counter
This commit is contained in:
parent
4e895f57e9
commit
2314ff51c1
8 changed files with 236 additions and 328 deletions
|
|
@ -7,8 +7,9 @@ import {TwabController} from "pt-v5-twab-controller/TwabController.sol";
|
|||
import {PoolAddress, PoolKey} from "@aperture/uni-v3-lib/PoolAddress.sol";
|
||||
import "@uniswap-v3-core/interfaces/IUniswapV3Factory.sol";
|
||||
import "@uniswap-v3-core/interfaces/IUniswapV3Pool.sol";
|
||||
import "./interfaces/IWETH9.sol";
|
||||
import "../src/interfaces/IWETH9.sol";
|
||||
import "../src/Harb.sol";
|
||||
import {BaseLineLP} from "../src/BaseLineLP.sol";
|
||||
import {Stake, ExceededAvailableStake} from "../src/Stake.sol";
|
||||
|
||||
address constant WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
|
||||
|
|
@ -23,10 +24,10 @@ contract HarbTest is Test {
|
|||
Harb harb;
|
||||
IUniswapV3Factory factory;
|
||||
Stake stake;
|
||||
LiquidityManager liquidityManager;
|
||||
BaseLineLP liquidityManager;
|
||||
|
||||
function setUp() public {
|
||||
mainnetFork = vm.createFork(vm.envString("ETH_NODE_URI_MAINNET"), 19433030);
|
||||
mainnetFork = vm.createFork(vm.envString("ETH_NODE_URI_MAINNET"), 19461248);
|
||||
vm.selectFork(mainnetFork);
|
||||
weth = IWETH9(WETH);
|
||||
TwabController tc = new TwabController(60 * 60 * 24, uint32(block.timestamp));
|
||||
|
|
@ -35,7 +36,7 @@ contract HarbTest is Test {
|
|||
factory.createPool(address(weth), address(harb), FEE);
|
||||
stake = new Stake(address(harb));
|
||||
harb.setStakingPool(address(stake));
|
||||
liquidityManager = new LiquidityManager(V3_FACTORY, WETH, address(harb));
|
||||
liquidityManager = new BaseLineLP(V3_FACTORY, WETH, address(harb));
|
||||
harb.setLiquidityManager(address(liquidityManager));
|
||||
}
|
||||
|
||||
|
|
@ -98,8 +99,9 @@ contract HarbTest is Test {
|
|||
// test stake when stake full
|
||||
{
|
||||
uint256[] memory empty;
|
||||
vm.expectRevert();
|
||||
//vm.expectRevert(abi.encodeWithSelector(ExceededAvailableStake.selector, account, amount, 0));
|
||||
vm.prank(account);
|
||||
vm.expectRevert(ExceededAvailableStake.selector);
|
||||
stake.snatch(amount, account, 2, empty);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +0,0 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
pragma solidity ^0.8.13;
|
||||
|
||||
import '@openzeppelin/token/ERC20/IERC20.sol';
|
||||
|
||||
/// @title Interface for WETH9
|
||||
interface IWETH9 is IERC20 {
|
||||
/// @notice Deposit ether to get wrapped ether
|
||||
function deposit() external payable;
|
||||
|
||||
/// @notice Withdraw wrapped ether to get ether
|
||||
function withdraw(uint256) external;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue