diff --git a/.mainnet.json b/.mainnet.json index fbb49f94..17981a27 100644 --- a/.mainnet.json +++ b/.mainnet.json @@ -39,7 +39,7 @@ "doubleSlope3": "0x4132392C57B9D2DE1BA393A03f23Fcb880Bf8EE1", "flatSlope1": "0x67e5308813382E4dd06246d3c72035209f6Bae3C", "flatSlope2": "0x434B4fe3562fdcF4687b6c258eEc4e564Bc0A263", - "flatSlope3": "" + "flatSlope3": "0xB0f78514edd28E2e1617a7479CCf7F0855aF979a" }, "sharedStrategies": { "pancakeswap": { @@ -397,4 +397,4 @@ "uniswapV2LikePathReader": "" }, "swapHelper": "" -} +} \ No newline at end of file diff --git a/deploy/config/set-non-collat-interest-model.ts b/deploy/config/set-non-collat-interest-model.ts index a09d5b0f..ae9b1918 100644 --- a/deploy/config/set-non-collat-interest-model.ts +++ b/deploy/config/set-non-collat-interest-model.ts @@ -21,8 +21,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) { const INPUTS = [ { account: "0xD0dfE9277B1DB02187557eAeD7e25F74eF2DE8f3", - token: "", - model: "", + token: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c", + model: "0xB0f78514edd28E2e1617a7479CCf7F0855aF979a", }, ]; diff --git a/foundry.toml b/foundry.toml index 272eda11..6587d50f 100644 --- a/foundry.toml +++ b/foundry.toml @@ -4,7 +4,7 @@ optimizer-runs = 1 src = 'solidity/contracts' out = 'out' cache_path = './forge_cache' -libs = ['node_modules'] +libs = ["node_modules", "lib"] test = 'solidity/tests' fs_permissions = [{ access = "read-write", path = "./" }] ffi = true diff --git a/script/BaseScript.sol b/script/BaseScript.sol index d29783e7..6a7ee343 100644 --- a/script/BaseScript.sol +++ b/script/BaseScript.sol @@ -1,8 +1,8 @@ // SPDX-License-Identifier: BUSL pragma solidity 0.8.19; -import "solidity/tests/utils/StdJson.sol"; -import { Script, console } from "solidity/tests/utils/Script.sol"; +import { stdJson } from "lib/forge-std/src/StdJson.sol"; +import { Script, console } from "lib/forge-std/src/Script.sol"; // libs import { LibMoneyMarketDeployment } from "./deployments/libraries/LibMoneyMarketDeployment.sol"; diff --git a/script/deployments/03_DeployMoneyMarket.s.sol b/script/deployments/03_DeployMoneyMarket.s.sol index 162922af..c5f1f9e0 100644 --- a/script/deployments/03_DeployMoneyMarket.s.sol +++ b/script/deployments/03_DeployMoneyMarket.s.sol @@ -1,8 +1,7 @@ // SPDX-License-Identifier: BUSL pragma solidity 0.8.19; -import "solidity/tests/utils/StdJson.sol"; -import "../BaseScript.sol"; +import { BaseScript, stdJson, IMoneyMarket } from "../BaseScript.sol"; import { LibMoneyMarketDeployment } from "./libraries/LibMoneyMarketDeployment.sol"; import { InterestBearingToken } from "solidity/contracts/money-market/InterestBearingToken.sol"; diff --git a/script/deployments/InterestModels/deploy/MMFlatSlopeModel3.s.sol b/script/deployments/InterestModels/deploy/MMFlatSlopeModel3.s.sol index 5e340e3b..0c69152e 100644 --- a/script/deployments/InterestModels/deploy/MMFlatSlopeModel3.s.sol +++ b/script/deployments/InterestModels/deploy/MMFlatSlopeModel3.s.sol @@ -1,13 +1,10 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.19; -import "../../../BaseScript.sol"; - +import { BaseScript } from "script/BaseScript.sol"; import { MMFlatSlopeModel3 } from "solidity/contracts/money-market/interest-models/MMFlatSlopeModel3.sol"; contract DeployMMFlatSlopeModel3Script is BaseScript { - using stdJson for string; - function run() external { /* ░██╗░░░░░░░██╗░█████╗░██████╗░███╗░░██╗██╗███╗░░██╗░██████╗░ @@ -18,10 +15,11 @@ contract DeployMMFlatSlopeModel3Script is BaseScript { ░░░╚═╝░░░╚═╝░░╚═╝░░╚═╝╚═╝░░╚═╝╚═╝░░╚══╝╚═╝╚═╝░░╚══╝░╚═════╝░ Check all variables below before execute the deployment script */ - // _startDeployerBroadcast(); + _startDeployerBroadcast(); // deploy implementation - // address interestModel = address(new MMFlatSlopeModel3()); - // _stopBroadcast(); - // _writeJson(vm.toString(interestModel), ".sharedConfig.flatSlope3"); + address interestModel = address(new MMFlatSlopeModel3()); + _stopBroadcast(); + + _writeJson(vm.toString(interestModel), ".sharedConfig.flatSlope3"); } } diff --git a/script/deployments/MoneyMarket/config/SetNonCollatInterestModel.s.sol b/script/deployments/MoneyMarket/config/SetNonCollatInterestModel.s.sol index 6de4e2b8..99fd4b63 100644 --- a/script/deployments/MoneyMarket/config/SetNonCollatInterestModel.s.sol +++ b/script/deployments/MoneyMarket/config/SetNonCollatInterestModel.s.sol @@ -22,10 +22,7 @@ contract SetNonCollatInterestModelScript is BaseScript { Check all variables below before execute the deployment script */ address borrower = 0xD0dfE9277B1DB02187557eAeD7e25F74eF2DE8f3; - SetInterestModelInput[2] memory _input = [ - SetInterestModelInput({ token: eth, interestModel: flatSlope2 }), - SetInterestModelInput({ token: btcb, interestModel: flatSlope2 }) - ]; + SetInterestModelInput[1] memory _input = [SetInterestModelInput({ token: wbnb, interestModel: flatSlope3 })]; //---- execution ----// _startDeployerBroadcast(); diff --git a/script/deployments/MoneyMarket/deploy/MoneyMarket.s.sol b/script/deployments/MoneyMarket/deploy/MoneyMarket.s.sol index b6d5ed6c..145f7fad 100644 --- a/script/deployments/MoneyMarket/deploy/MoneyMarket.s.sol +++ b/script/deployments/MoneyMarket/deploy/MoneyMarket.s.sol @@ -1,8 +1,7 @@ // SPDX-License-Identifier: MIT pragma solidity 0.8.19; -import "solidity/tests/utils/StdJson.sol"; -import "../../../BaseScript.sol"; +import { BaseScript, stdJson, IMoneyMarket } from "../../../BaseScript.sol"; import { InterestBearingToken } from "solidity/contracts/money-market/InterestBearingToken.sol"; import { DebtToken } from "solidity/contracts/money-market/DebtToken.sol";