2020-11-16 16:55:04 +00:00
|
|
|
const { sleep } = require("@gelatonetwork/core");
|
2020-11-04 12:21:01 +00:00
|
|
|
|
|
|
|
module.exports = async (hre) => {
|
|
|
|
if (hre.network.name === "mainnet") {
|
|
|
|
console.log("Deploying MakerResolver to mainnet. Hit ctrl + c to abort");
|
2020-11-16 16:55:04 +00:00
|
|
|
await sleep(2000);
|
2020-11-04 12:21:01 +00:00
|
|
|
}
|
|
|
|
|
2020-11-16 16:55:04 +00:00
|
|
|
const { deployments } = hre;
|
|
|
|
const { deploy } = deployments;
|
|
|
|
const { deployer } = await hre.getNamedAccounts();
|
2020-11-04 12:21:01 +00:00
|
|
|
|
|
|
|
// the following will only deploy "MakerResolver"
|
|
|
|
// if the contract was never deployed or if the code changed since last deployment
|
|
|
|
await deploy("MakerResolver", {
|
|
|
|
from: deployer,
|
|
|
|
gasPrice: hre.network.config.gasPrice,
|
|
|
|
log: hre.network.name === "mainnet" ? true : false,
|
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
module.exports.tags = ["MakerResolver"];
|