Gelato-automations/deploy/resolvers/PriceOracleResolver.deploy.js
2020-11-16 17:58:36 +01:00

25 lines
727 B
JavaScript

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