Gelato-automations/deploy/gelato/conditions/ConditionBorrowAmountIsDust.deploy.js
Twin Fish 2a2158f89b
Add debt ceiling and dust check (#92)
* feat: conditions debt ceiling and dust
2020-12-01 12:52:58 +01:00

28 lines
863 B
JavaScript

const { sleep } = require("@gelatonetwork/core");
module.exports = async (hre) => {
if (hre.network.name === "mainnet") {
console.log(
"\n\n Deploying ConditionBorrowAmountIsDust to mainnet. Hit ctrl + c to abort"
);
await sleep(10000);
}
const { deployments } = hre;
const { deploy } = deployments;
const { deployer } = await hre.getNamedAccounts();
// the following will only deploy "ConditionBorrowAmountIsDust"
// if the contract was never deployed or if the code changed since last deployment
await deploy("ConditionBorrowAmountIsDust", {
from: deployer,
gasPrice: hre.network.config.gasPrice,
log: hre.network.name === "mainnet" ? true : false,
});
};
module.exports.skip = async (hre) => {
return hre.network.name === "mainnet" ? true : false;
};
module.exports.tags = ["ConditionBorrowAmountIsDust"];