2024-03-18 12:42:30 +01:00
|
|
|
pragma solidity ^0.8.19;
|
2023-11-21 21:06:21 +01:00
|
|
|
|
|
|
|
|
import "forge-std/Script.sol";
|
2024-03-12 20:22:10 +01:00
|
|
|
import {TwabController} from "pt-v5-twab-controller/TwabController.sol";
|
2024-03-14 17:31:16 +01:00
|
|
|
import "@uniswap-v3-core/interfaces/IUniswapV3Factory.sol";
|
2024-02-23 22:01:23 +01:00
|
|
|
import "../src/Harb.sol";
|
|
|
|
|
import "../src/Stake.sol";
|
2024-03-18 12:42:30 +01:00
|
|
|
import {BaseLineLP} from "../src/BaseLineLP.sol";
|
2023-11-21 21:06:21 +01:00
|
|
|
|
2024-03-14 12:40:57 +01:00
|
|
|
address constant WETH = 0xb16F35c0Ae2912430DAc15764477E179D9B9EbEa; //Sepolia
|
|
|
|
|
address constant V3_FACTORY = 0x0227628f3F023bb0B980b67D528571c95c6DaC1c; //Sepolia
|
2024-05-15 19:46:23 +02:00
|
|
|
address constant TWABC = 0x64ddA11815B883C589AFeD914666ef2D63C8C338; //new TwabController(60 * 60 * 24, uint32(block.timestamp));
|
2024-03-14 12:48:14 +01:00
|
|
|
uint24 constant FEE = uint24(10_000);
|
2024-03-14 12:40:57 +01:00
|
|
|
|
2024-03-12 20:22:10 +01:00
|
|
|
contract SepoliaScript is Script {
|
2023-11-21 21:06:21 +01:00
|
|
|
function setUp() public {}
|
|
|
|
|
|
|
|
|
|
function run() public {
|
|
|
|
|
string memory seedPhrase = vm.readFile(".secret");
|
|
|
|
|
uint256 privateKey = vm.deriveKey(seedPhrase, 0);
|
|
|
|
|
vm.startBroadcast(privateKey);
|
|
|
|
|
|
2024-05-15 19:46:23 +02:00
|
|
|
TwabController tc = TwabController(TWABC);
|
|
|
|
|
//TwabController tc = new TwabController(60 * 60, uint32(block.timestamp));
|
2024-06-19 10:33:28 +02:00
|
|
|
Harb harb = new Harb("Harberger Tax", "HARB", tc);
|
2024-03-12 11:38:16 +01:00
|
|
|
Stake stake = new Stake(address(harb));
|
|
|
|
|
harb.setStakingPool(address(stake));
|
2024-03-14 17:31:16 +01:00
|
|
|
IUniswapV3Factory factory = IUniswapV3Factory(V3_FACTORY);
|
2024-06-19 10:33:28 +02:00
|
|
|
address liquidityPool = factory.createPool(WETH, address(harb), FEE);
|
|
|
|
|
harb.setLiquidityPool(liquidityPool);
|
2024-04-11 22:32:47 +02:00
|
|
|
BaseLineLP liquidityManager = new BaseLineLP(V3_FACTORY, WETH, address(harb));
|
|
|
|
|
harb.setLiquidityManager(address(liquidityManager));
|
2023-11-21 21:06:21 +01:00
|
|
|
vm.stopBroadcast();
|
|
|
|
|
}
|
2024-03-12 20:22:10 +01:00
|
|
|
}
|