-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.ts
112 lines (102 loc) · 2.7 KB
/
index.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import readline from "readline"
import fs from "fs";
import { cluster } from "./config"
import { retrieveEnvVariable, sleep } from "./src/utils"
import {
getWalletTokenAccount,
} from "./src/get_balance";
import { main_menu_display, rl, screen_clear, security_checks_display } from "./menu/menu";
import { create_token } from "./layout/createToken";
import { create_market } from "./layout/createMarket";
import { revokeMintAuthority } from "./src/revokeMintAuthority";
import { revokeFreezeAuthority } from "./src/revokeFreezeAuthority";
import { bundle_pool_buy } from "./layout/poolBuy";
import { burn_lp } from "./src/burnLp";
import { manual_all_sell } from "./layout/manualAllSell";
import { wallet_create } from "./layout/walletCreate";
import { create_extend_lut_ata } from "./layout/createLutAta";
import { simulate } from "./layout/simulation";
import { sol_gather } from "./layout/solGather";
// import { manualRebuy } from "./layout/rebuy";
// import { holderDistribute } from "./layout/holderDistribute";
type WalletTokenAccounts = Awaited<ReturnType<typeof getWalletTokenAccount>>
// export const rl = readline.createInterface({
// input: process.stdin,
// output: process.stdout
// })
export const init = () => {
screen_clear();
console.log("Raydium Token Launchpad");
main_menu_display();
rl.question("\t[Main] - Choice: ", (answer: string) => {
let choice = parseInt(answer);
switch (choice) {
case 1:
create_token();
break;
case 2:
create_market();
break;
case 3:
security_checks();
break;
case 4:
wallet_create();
break;
case 5:
create_extend_lut_ata();
break;
case 6:
simulate();
break;
case 7:
bundle_pool_buy();
break;
case 8:
manual_all_sell();
break;
case 9:
sol_gather();
break;
case 10:
process.exit(1);
break;
default:
console.log("\tInvalid choice!");
sleep(1500);
init();
break;
}
})
}
export const security_checks = () => {
screen_clear();
console.log("Security Checks")
security_checks_display();
rl.question("\t[Security Checks] - Choice: ", (answer: string) => {
let choice = parseInt(answer);
switch (choice) {
case 1:
revokeMintAuthority();
break;
case 2:
revokeFreezeAuthority();
break;
case 3:
burn_lp();
break;
case 4:
init();
break;
case 5:
process.exit(1);
break;
default:
console.log("\tInvalid choice!");
sleep(1500);
security_checks();
break;
}
})
}
init()