-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtaskHandler.ts
More file actions
45 lines (42 loc) · 1.5 KB
/
taskHandler.ts
File metadata and controls
45 lines (42 loc) · 1.5 KB
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
38
39
40
41
42
43
44
45
import { SUPPORTED_NETWORKS } from './scripts/constants/supportedNetworks'
import {
DEPLOY_LIMITPOOL,
DEPLOY_LIMITPOOLS,
INCREASE_SAMPLES,
MINT_POSITION,
MINT_TOKENS,
VERIFY_CONTRACTS,
} from './tasks/constants/taskNames'
import { purpleLog } from './test/utils/colors'
export function handleHardhatTasks() {
handleLimitPoolTasks()
}
function handleLimitPoolTasks() {
// for (const network in SUPPORTED_NETWORKS) {
// if (Object.keys(LOCAL_NETWORKS).includes(network)) continue;
// hre.masterNetwork = MASTER_NETWORKS[network];
// break;
// }
if (process.argv.includes(DEPLOY_LIMITPOOLS)) {
import('./tasks/deploy/deploy-limitpools')
logTask(DEPLOY_LIMITPOOLS)
} else if (process.argv.includes(DEPLOY_LIMITPOOL)) {
import('./tasks/deploy/deploy-limitpool')
logTask(DEPLOY_LIMITPOOL)
} else if (process.argv.includes(INCREASE_SAMPLES)) {
import('./tasks/deploy/increase-samples')
logTask(INCREASE_SAMPLES)
} else if (process.argv.includes(MINT_TOKENS)) {
import('./tasks/deploy/mint-tokens')
logTask(MINT_TOKENS)
} else if (process.argv.includes(MINT_POSITION)) {
import('./tasks/deploy/mint-position')
logTask(MINT_POSITION)
} else if (process.argv.includes(VERIFY_CONTRACTS)) {
import('./tasks/deploy/verify-contracts')
logTask(VERIFY_CONTRACTS)
}
}
function logTask(taskName: string) {
purpleLog(`\n🎛 Running ${taskName} task...\n`)
}