Skip to content

Commit

Permalink
Merge pull request #501 from VenusProtocol/fix/new-vbnb-ir
Browse files Browse the repository at this point in the history
[VEN-2679] New VBNB IR Deployment
  • Loading branch information
web3rover authored Jul 22, 2024
2 parents 3970c9d + 21f12bd commit daed7df
Show file tree
Hide file tree
Showing 5 changed files with 414 additions and 43 deletions.
45 changes: 28 additions & 17 deletions deploy/002-interest-rate-model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,41 @@ import { DeployFunction } from "hardhat-deploy/types";
import { HardhatRuntimeEnvironment } from "hardhat/types";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
const { deployments, getNamedAccounts } = hre;
const { deployments, getNamedAccounts, network } = hre;
const { deploy } = deployments;

const { deployer } = await getNamedAccounts();

await deploy("InterestRateModelVUSDC", {
contract: "JumpRateModel",
from: deployer,
log: true,
autoMine: true,
args: [0, "50000000000000000", "1090000000000000000", "800000000000000000"],
});
if (!network.live) {
await deploy("InterestRateModelVUSDC", {
contract: "JumpRateModel",
from: deployer,
log: true,
autoMine: true,
args: [0, "50000000000000000", "1090000000000000000", "800000000000000000"],
});

await deploy("InterestRateModelVETH", {
contract: "JumpRateModel",
from: deployer,
log: true,
autoMine: true,
args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"],
});
await deploy("InterestRateModelVETH", {
contract: "JumpRateModel",
from: deployer,
log: true,
autoMine: true,
args: [0, "40000000000000000", "1080000000000000000", "700000000000000000"],
});
}

if (network.name === "bscmainnet") {
await deploy("InterestRateModelVBNB", {
contract: "JumpRateModel",
from: deployer,
log: true,
autoMine: true,
args: [0, "225000000000000000", "6800000000000000000", "700000000000000000"],
});
}
};

func.tags = ["InterestRateModel"];
// These contracts are not deployed on a live network so we only want to try and deploy them locally
func.skip = async hre => hre.network.name !== "hardhat";
func.skip = async hre => hre.network.name !== "hardhat" && hre.network.name !== "bscmainnet";

export default func;
2 changes: 1 addition & 1 deletion deployments/bscmainnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -8816,7 +8816,7 @@
]
},
"InterestRateModelVBNB": {
"address": "0xF558Be24F2CACb65a4BB41A155631C83B15388F1",
"address": "0xe5be8D9f4697dD264e488efD4b29c8CC31616fa5",
"abi": [
{
"inputs": [
Expand Down
Loading

0 comments on commit daed7df

Please sign in to comment.