@@ -4,9 +4,10 @@ pragma solidity ^0.8.0;
44
55import {ScriptUtils} from "./utils/ScriptUtils.s.sol " ;
66import {FeeFlowController} from "fee-flow/FeeFlowController.sol " ;
7+ import {FeeFlowControllerUtil} from "../src/Util/FeeFlowControllerUtil.sol " ;
78
89contract FeeFlow is ScriptUtils {
9- function run () public broadcast returns (address feeFlowController ) {
10+ function run () public broadcast returns (address feeFlowController , address feeFlowControllerUtil ) {
1011 string memory inputScriptFileName = "11_FeeFlow_input.json " ;
1112 string memory outputScriptFileName = "11_FeeFlow_output.json " ;
1213 string memory json = getScriptFile (inputScriptFileName);
@@ -18,11 +19,12 @@ contract FeeFlow is ScriptUtils {
1819 uint256 priceMultiplier = vm.parseJsonUint (json, ".priceMultiplier " );
1920 uint256 minInitPrice = vm.parseJsonUint (json, ".minInitPrice " );
2021
21- feeFlowController =
22+ ( feeFlowController, feeFlowControllerUtil) =
2223 execute (evc, initPrice, paymentToken, paymentReceiver, epochPeriod, priceMultiplier, minInitPrice);
2324
2425 string memory object;
2526 object = vm.serializeAddress ("feeFlow " , "feeFlowController " , feeFlowController);
27+ object = vm.serializeAddress ("feeFlow " , "feeFlowControllerUtil " , feeFlowControllerUtil);
2628 vm.writeJson (object, string .concat (vm.projectRoot (), "/script/ " , outputScriptFileName));
2729 }
2830
@@ -34,8 +36,8 @@ contract FeeFlow is ScriptUtils {
3436 uint256 epochPeriod ,
3537 uint256 priceMultiplier ,
3638 uint256 minInitPrice
37- ) public broadcast returns (address feeFlowController ) {
38- feeFlowController =
39+ ) public broadcast returns (address feeFlowController , address feeFlowControllerUtil ) {
40+ ( feeFlowController, feeFlowControllerUtil) =
3941 execute (evc, initPrice, paymentToken, paymentReceiver, epochPeriod, priceMultiplier, minInitPrice);
4042 }
4143
@@ -47,11 +49,12 @@ contract FeeFlow is ScriptUtils {
4749 uint256 epochPeriod ,
4850 uint256 priceMultiplier ,
4951 uint256 minInitPrice
50- ) public returns (address feeFlowController ) {
52+ ) public returns (address feeFlowController , address feeFlowControllerUtil ) {
5153 feeFlowController = address (
5254 new FeeFlowController (
5355 evc, initPrice, paymentToken, paymentReceiver, epochPeriod, priceMultiplier, minInitPrice
5456 )
5557 );
58+ feeFlowControllerUtil = address (new FeeFlowControllerUtil (address (feeFlowController)));
5659 }
5760}
0 commit comments