33 lines
1.4 KiB
Solidity
33 lines
1.4 KiB
Solidity
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 "../src/Harb.sol";
|
|
import "../src/Stake.sol";
|
|
import {BaseLineLP} from "../src/BaseLineLP.sol";
|
|
|
|
address constant WETH = 0xb16F35c0Ae2912430DAc15764477E179D9B9EbEa; //Sepolia
|
|
address constant V3_FACTORY = 0x0227628f3F023bb0B980b67D528571c95c6DaC1c; //Sepolia
|
|
address constant TWABC = 0x79Deda2d38A3232fE9b68DcB7d6b461d793A7236; //new TwabController(60 * 60 * 24, uint32(block.timestamp));
|
|
uint24 constant FEE = uint24(10_000);
|
|
|
|
contract SepoliaScript is Script {
|
|
function setUp() public {}
|
|
|
|
function run() public {
|
|
string memory seedPhrase = vm.readFile(".secret");
|
|
uint256 privateKey = vm.deriveKey(seedPhrase, 0);
|
|
vm.startBroadcast(privateKey);
|
|
|
|
TwabController tc = TwabController(TWABC);
|
|
Harb harb = new Harb("Harberger Tax", "HARB", V3_FACTORY, WETH, tc);
|
|
Stake stake = new Stake(address(harb));
|
|
harb.setStakingPool(address(stake));
|
|
IUniswapV3Factory factory = IUniswapV3Factory(V3_FACTORY);
|
|
factory.createPool(WETH, address(harb), FEE);
|
|
BaseLineLP liquidityManager = new BaseLineLP(V3_FACTORY, WETH, address(harb));
|
|
harb.setLiquidityManager(address(liquidityManager));
|
|
vm.stopBroadcast();
|
|
}
|
|
}
|