Skip to content

Commit

Permalink
deploy: new flat slope interest model
Browse files Browse the repository at this point in the history
  • Loading branch information
spicysquid168 committed Mar 8, 2024
1 parent f8405ec commit ebadc64
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 23 deletions.
4 changes: 2 additions & 2 deletions .mainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"doubleSlope3": "0x4132392C57B9D2DE1BA393A03f23Fcb880Bf8EE1",
"flatSlope1": "0x67e5308813382E4dd06246d3c72035209f6Bae3C",
"flatSlope2": "0x434B4fe3562fdcF4687b6c258eEc4e564Bc0A263",
"flatSlope3": ""
"flatSlope3": "0xB0f78514edd28E2e1617a7479CCf7F0855aF979a"
},
"sharedStrategies": {
"pancakeswap": {
Expand Down Expand Up @@ -397,4 +397,4 @@
"uniswapV2LikePathReader": ""
},
"swapHelper": ""
}
}
4 changes: 2 additions & 2 deletions deploy/config/set-non-collat-interest-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const INPUTS = [
{
account: "0xD0dfE9277B1DB02187557eAeD7e25F74eF2DE8f3",
token: "",
model: "",
token: "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",
model: "0xB0f78514edd28E2e1617a7479CCf7F0855aF979a",
},
];

Expand Down
2 changes: 1 addition & 1 deletion foundry.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions script/BaseScript.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
3 changes: 1 addition & 2 deletions script/deployments/03_DeployMoneyMarket.s.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down
14 changes: 6 additions & 8 deletions script/deployments/InterestModels/deploy/MMFlatSlopeModel3.s.sol
Original file line number Diff line number Diff line change
@@ -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 {
/*
░██╗░░░░░░░██╗░█████╗░██████╗░███╗░░██╗██╗███╗░░██╗░██████╗░
Expand All @@ -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");
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
3 changes: 1 addition & 2 deletions script/deployments/MoneyMarket/deploy/MoneyMarket.s.sol
Original file line number Diff line number Diff line change
@@ -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";
Expand Down

0 comments on commit ebadc64

Please sign in to comment.