took out UBI and cleaned up

This commit is contained in:
giteadmin 2025-01-23 13:21:49 +01:00
parent 5db3ecb3d7
commit 092f88a668
9 changed files with 88 additions and 598 deletions

View file

@ -1,7 +1,6 @@
pragma solidity ^0.8.19;
import "forge-std/Script.sol";
import {TwabController} from "pt-v5-twab-controller/TwabController.sol";
import "@uniswap-v3-core/interfaces/IUniswapV3Factory.sol";
import "@uniswap-v3-core/interfaces/IUniswapV3Pool.sol";
import "../src/Harberg.sol";
@ -28,24 +27,16 @@ contract DeployScript is Script {
vm.startBroadcast(privateKey);
//address sender = vm.addr(privateKey);
TwabController tc;
if (twabc == address(0)) {
tc = TwabController(twabc);
} else {
// in case you want to deploy an new TwabController
tc = new TwabController(60 * 60, uint32(block.timestamp));
}
Harberg harb = new Harberg("Harbergerger Tax", "HARB", tc);
Harberg harb = new Harberg("Harbergerger Tax", "HARB");
token0isWeth = address(weth) < address(harb);
Stake stake = new Stake(address(harb));
Stake stake = new Stake(address(harb), feeDest);
harb.setStakingPool(address(stake));
IUniswapV3Factory factory = IUniswapV3Factory(v3Factory);
address liquidityPool = factory.createPool(weth, address(harb), FEE);
IUniswapV3Pool(liquidityPool).initializePoolFor1Cent(token0isWeth);
harb.setLiquidityPool(liquidityPool);
Sentimenter sentimenter = new Sentimenter();
bytes memory params = abi.encodeWithSignature("initialize(address,address)", address(harb),address(stake));
ERC1967Proxy proxy = new ERC1967Proxy(address(sentimenter), params);
Sentimenter sentimenter = new Sentimenter();
bytes memory params = abi.encodeWithSignature("initialize(address,address)", address(harb),address(stake));
ERC1967Proxy proxy = new ERC1967Proxy(address(sentimenter), params);
LiquidityManager liquidityManager = new LiquidityManager(v3Factory, weth, address(harb), address(proxy));
liquidityManager.setFeeDestination(feeDest);
// note: this delayed initialization is not a security issue.