forked from ArrakisFinance/v2-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Position.deploy.ts
37 lines (33 loc) · 1.06 KB
/
Position.deploy.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { deployments, getNamedAccounts } from "hardhat";
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import { sleep } from "../src/utils";
const func: DeployFunction = async (hre: HardhatRuntimeEnvironment) => {
if (
hre.network.name === "mainnet" ||
hre.network.name === "polygon" ||
hre.network.name === "goerli" ||
hre.network.name === "optimism"
) {
console.log(
`Deploying Position to ${hre.network.name}. Hit ctrl + c to abort`
);
await sleep(10000);
}
const { deploy } = deployments;
const { deployer } = await getNamedAccounts();
await deploy("Position", {
from: deployer,
log: hre.network.name != "hardhat" ? true : false,
});
};
export default func;
func.skip = async (hre: HardhatRuntimeEnvironment) => {
const shouldSkip =
hre.network.name === "mainnet" ||
hre.network.name === "polygon" ||
hre.network.name === "goerli" ||
hre.network.name === "optimism";
return shouldSkip ? true : false;
};
func.tags = ["Position"];