Skip to content

Commit

Permalink
Add deployment script, remove invalid .env.example
Browse files Browse the repository at this point in the history
  • Loading branch information
kphed committed Dec 11, 2023
1 parent 418a7ee commit 5d35e3c
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 4 deletions.
2 changes: 0 additions & 2 deletions .env.example

This file was deleted.

32 changes: 30 additions & 2 deletions script/FeeDistributor.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,39 @@
pragma solidity ^0.8.10;

import "forge-std/Script.sol";
import {Authority} from "solmate/auth/Auth.sol";
import {ERC20} from "solmate/tokens/ERC20.sol";
import {FlywheelCore} from "flywheel-v2/FlywheelCore.sol";
import {IFlywheelRewards} from "flywheel-v2/interfaces/IFlywheelRewards.sol";
import {IFlywheelBooster} from "flywheel-v2/interfaces/IFlywheelBooster.sol";
import {FlywheelDynamicRewards} from "flywheel-v2/rewards/FlywheelDynamicRewards.sol";
import {DynamicRewards} from "src/DynamicRewards.sol";
import {StakedBRR} from "src/StakedBRR.sol";

contract FeeDistributorScript is Script {
function setUp() public {}
address public constant WETH = 0x4200000000000000000000000000000000000006;
uint32 public constant REWARDS_CYCLE_LENGTH = 1 weeks;

function run() public {
vm.broadcast();
vm.startBroadcast(vm.envUint("PRIVATE_KEY"));

FlywheelCore flywheel = new FlywheelCore(
ERC20(WETH),
IFlywheelRewards(address(0)),
IFlywheelBooster(address(0)),
vm.envAddress("OWNER"),
Authority(address(0))
);
DynamicRewards dynamicRewards = new DynamicRewards(
WETH,
flywheel,
REWARDS_CYCLE_LENGTH
);
ERC20 stakedBRR = ERC20(address(new StakedBRR(address(flywheel))));

flywheel.setFlywheelRewards(dynamicRewards);
flywheel.addStrategyForRewards(ERC20(address(stakedBRR)));

vm.stopBroadcast();
}
}

0 comments on commit 5d35e3c

Please sign in to comment.