harb/onchain/script/Deploy.sol

27 lines
892 B
Solidity
Raw Normal View History

2023-11-21 21:06:21 +01:00
pragma solidity ^0.8.4;
import "forge-std/Script.sol";
2024-03-12 20:22:10 +01:00
import {TwabController} from "pt-v5-twab-controller/TwabController.sol";
2024-02-23 22:01:23 +01:00
import "../src/Harb.sol";
import "../src/Stake.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-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-03-12 20:22:10 +01:00
TwabController tc = new TwabController(60 * 60 * 24, uint32(block.timestamp));
2024-03-14 12:40:57 +01:00
Harb harb = new Harb("Harberger Tax", "HARB", V3_FACTORY, WETH, tc);
2024-03-12 11:38:16 +01:00
Stake stake = new Stake(address(harb));
harb.setStakingPool(address(stake));
2023-11-21 21:06:21 +01:00
vm.stopBroadcast();
}
2024-03-12 20:22:10 +01:00
}