-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathmain.js
More file actions
312 lines (288 loc) · 11.6 KB
/
Copy pathmain.js
File metadata and controls
312 lines (288 loc) · 11.6 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
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
import readline from 'readline';
import chalk from 'chalk';
import fs from 'fs';
import buyThePumpJito from './src/jitoBuy.js';
import sellTheDump from './src/pumpSell.js';
import raySell from './src/raydium/sell.js';
import genWallet from './src/walletGen.js';
import distro from './src/distro.js';
import refund from './src/refund.js';
import checkBalances from './src/balances.js';
import walletTracker from './src/walletMonitor.js';
import humanMode from './src/humanMode.js';
import staggerBuy from './src/staggerBuy.js';
import closeTokenAccounts from './src/closeAccounts.js';
import sendSPL from './src/transferSPL.js';
import singleSell from './src/singleSell.js';
import microBuySpam from './src/microBuy.js';
import createPumpProfiles from './src/profile/main.js';
import buyAndSell from './src/sameTX.js';
import cleanup from './src/cleanup.js';
import warmupWallets from './src/warmup.js';
import delaySell from './src/delaySell.js';
import unwrapWSOL from './src/raydium/unwrap.js';
import promptBuyAmounts from './src/buyAmt.js';
process.removeAllListeners('warning');
process.removeAllListeners('ExperimentalWarning');
let rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
async function promptUser(promptText) {
return new Promise((resolve) => {
rl.question(promptText, (answer) => {
resolve(answer);
});
});
}
rl.on('SIGINT', () => {
process.exit();
});
async function printAscii() {
const ascii = fs.readFileSync('./ascii.txt', 'utf8');
console.log("\n");
console.log(chalk.green(ascii));
console.log(chalk.blue("By Infinity Scripts\n"));
}
printAscii();
// Define the main menu
async function mainMenu() {
console.log(chalk.bgBlack.green('\n=== Main Menu ===\n'));
console.log(chalk.bold.red('CTRL + C to exit at any point\n'));
console.log(chalk.yellow('1:') + chalk.hex('#4ECDC4')(' Buy Modes'));
console.log(chalk.yellow('2:') + chalk.hex('#FF6B6B')(' Sell Modes'));
console.log(chalk.yellow('3:') + chalk.hex('#45B7D1')(' Wallets'));
console.log(chalk.yellow('4:') + chalk.hex('#FF8C42')(' Transfer'));
console.log(chalk.yellow('Q:') + chalk.hex('#C04CFD')(' Quit'));
const action = await promptUser("\n--> ");
return action.toUpperCase();
}
// Define the sub-menus
async function buyMenu() {
console.clear();
console.log(chalk.bgCyan.black('\n=== Buy Modes ===\n'));
console.log(chalk.yellow('1:') + chalk.hex('#FF6B6B')(' Bundle Buy (JITO)'));
console.log(chalk.yellow('2:') + chalk.hex('#4ECDC4')(' Auto Volume'));
console.log(chalk.yellow('3:') + chalk.hex('#45B7D1')(' Human Mode'));
console.log(chalk.yellow('4:') + chalk.hex('#FF8C42')(' MicroBuy (SPAM)'));
console.log(chalk.yellow('5:') + chalk.hex('#98D8C8')(' BumpBot'));
console.log(chalk.yellow('6:') + chalk.hex('#F3A712')(' Warmup Mode'));
console.log(chalk.yellow('7:') + chalk.hex('#064f8c')(' Stagger Buy'));
console.log(chalk.yellow('8:') + chalk.hex('#C04CFD')(' Back to Main Menu'));
const action = await promptUser('\n--> ');
return action.toUpperCase();
}
async function sellMenu() {
console.clear();
console.log(chalk.bgMagenta.black('\n=== Sell Modes ===\n'));
console.log(chalk.yellow('1:') + chalk.hex('#FF6B6B')(' Sell All (JITO)'));
console.log(chalk.yellow('2:') + chalk.hex('#4ECDC4')(' Single Wallet Sell'));
console.log(chalk.yellow('3:') + chalk.hex('#FF8C42')(' Delay Sell'));
console.log(chalk.yellow('4:') + chalk.hex('#45B7D1')(' Cleanup Mode'));
console.log(chalk.yellow('5:') + chalk.hex('#C1D4H4')(' Ray Single Sell'));
console.log(chalk.yellow('6:') + chalk.hex('#C04CFD')(' Back to Main Menu'));
const action = await promptUser('\n--> ');
return action.toUpperCase();
}
async function walletMenu() {
console.clear();
console.log(chalk.bgGreen.black('\n=== Wallets ===\n'));
console.log(chalk.yellow('1:') + chalk.hex('#6A5ACD')(' Gen Wallets'));
console.log(chalk.yellow('2:') + chalk.hex('#4ECDC4')(' Check Balances'));
console.log(chalk.yellow('3:') + chalk.hex('#45B7D1')(' Close Token Accounts'));
console.log(chalk.yellow('4:') + chalk.hex('#FF8C42')(' Create Profiles'));
console.log(chalk.yellow('5:') + chalk.hex('#C04CFD')(' Unwrap WSOL'));
console.log(chalk.yellow('6:') + chalk.hex('#4CAF50')(' Set Buy Amounts'));
console.log(chalk.yellow('7:') + chalk.hex('#FF0000')(' Back to Main Menu'));
const action = await promptUser('\n--> ');
return action.toUpperCase();
}
async function transferMenu() {
console.clear();
console.log(chalk.bgYellow.black('\n=== Transfer ===\n'));
console.log(chalk.blue('1:') + chalk.hex('#FF6B6B')(' Send to Volume Wallets'));
console.log(chalk.blue('2:') + chalk.hex('#4ECDC4')(' Return to Main Wallet'));
console.log(chalk.blue('3:') + chalk.hex('#45B7D1')(' Transfer SPL to Main Wallet'));
console.log(chalk.blue('4:') + chalk.hex('#C04CFD')(' Back to Main Menu'));
const action = await promptUser('\n--> ');
return action.toUpperCase();
}
// Handle actions based on user input
async function handleAction(action) {
switch (action) {
case '1':
await handleBuyMenu();
return;
case '2':
await handleSellMenu();
return;
case '3':
await handleWalletMenu();
return;
case '4':
await handleTransferMenu();
return;
case 'Q':
console.log(chalk.red("Goodbye"));
process.exit(0);
default:
console.log(chalk.red("Invalid input, please try again."));
}
}
// Handle buy menu actions
async function handleBuyMenu() {
const action = await buyMenu();
switch (action) {
case '1':
let mint = await promptUser("Enter Token CA: ");
let delay = await promptUser("Enter delay in ms (1s = 1000): ");
console.log(chalk.green(`Generating Volume for ${mint}`));
await buyThePumpJito(mint, delay);
break;
case '2':
let autoMinDelay = await promptUser("Enter min delay in seconds: ");
let autoMaxDelay = await promptUser("Enter max delay in seconds: ");
let autoSellPct = await promptUser("Enter sell percentage (0 - 100): ");
console.log(chalk.blue("Starting Wallet Monitor, please launch a token after you see this message!"));
await walletTracker(autoMinDelay, autoMaxDelay, autoSellPct);
break;
case '3':
let token = await promptUser("Enter Token CA: ");
let minDelay = await promptUser("Enter min delay in seconds: ");
let maxDelay = await promptUser("Enter max delay in seconds: ");
let humanSellPct = await promptUser("Enter sell percentage (0 - 100): ");
console.log("\n");
await humanMode(token, minDelay, maxDelay, humanSellPct);
break;
case '4':
let tokenCA = await promptUser("Enter Token CA: ");
let delayMS = await promptUser("Enter delay in ms (1s = 1000): ");
await microBuySpam(tokenCA, delayMS);
break;
case '5':
let t = await promptUser("Enter Token CA: ");
let buyAmt = await promptUser("Enter Buy Amount: ");
let d = await promptUser("Enter delay in ms (1s = 1000): ");
await buyAndSell(t, buyAmt, d, rl);
rl.removeAllListeners('line'); // Add this line
break;
case '6':
let loops = await promptUser("Enter number of loops: ");
let warmupDelay = await promptUser("Enter delay in ms (1s = 1000): ");
await warmupWallets(loops, warmupDelay);
break;
case '7':
const staggerCA = await promptUser("Enter Token CA: ");
const staggerDelay = await promptUser("Enter delay in ms (1s = 1000): ");
const staggerLoops = await promptUser("Enter number of loops: ");
const useJito = await promptUser("Use JITO (y/n): ");
if (useJito.toUpperCase() === 'Y') {
await staggerBuy(staggerCA, staggerDelay, true, staggerLoops);
} else {
await staggerBuy(staggerCA, staggerDelay, false, staggerLoops);
}
break;
case '8':
return; // Go back to the main menu
default:
console.log(chalk.red("Invalid input, please try again."));
await handleBuyMenu(); // Retry the buy menu
}
}
// Handle sell menu actions
async function handleSellMenu() {
const action = await sellMenu();
switch (action) {
case '1':
let mint = await promptUser("Enter Token CA: ");
let percent = await promptUser("Enter percentage to sell (1 - 100): ");
await sellTheDump(mint, percent);
break;
case '2':
let token = await promptUser("Enter Token CA: ");
await singleSell(token, rl);
break;
case '3':
let ca = await promptUser("Enter Token CA: ");
let delay = await promptUser("Enter delay in ms (1s = 1000): ");
await delaySell(ca, delay);
break;
case '4':
console.log(chalk.blue("Starting Cleanup Mode, this will sell ALL PF tokens from your sub wallets!"));
await cleanup();
break;
case '5':
let tokenCA = await promptUser("Enter Token CA: ");
let rayPercent = await promptUser("Enter percentage to sell (1 - 100): ");
await raySell(tokenCA, parseInt(rayPercent));
break;
case '6':
return; // Go back to the main menu
default:
console.log(chalk.red("Invalid input, please try again."));
await handleSellMenu(); // Retry the sell menu
}
}
// Handle wallet menu actions
async function handleWalletMenu() {
const action = await walletMenu();
switch (action) {
case '1':
let amount = await promptUser("Enter amount of wallets to generate: ");
await genWallet(amount);
break;
case '2':
await checkBalances();
break;
case '3':
await closeTokenAccounts();
break;
case '4':
await createPumpProfiles();
break;
case '5':
await unwrapWSOL();
break;
case '6':
await promptBuyAmounts();
break;
case '7':
return; // Go back to the main menu
default:
console.log(chalk.red("Invalid input, please try again."));
await handleWalletMenu(); // Retry the wallet menu
}
}
// Handle transfer menu actions
async function handleTransferMenu() {
const action = await transferMenu();
switch (action) {
case '1':
await distro();
break;
case '2':
console.log(chalk.blue("Returning all SOL to dev wallet..."));
await refund();
break;
case '3':
let mint = await promptUser("Enter Token CA: ");
let recieveWallet = await promptUser("Enter receiver wallet (public key): ");
await sendSPL(mint, recieveWallet);
break;
case '4':
return; // Go back to the main menu
default:
console.log(chalk.red("Invalid input, please try again."));
await handleTransferMenu(); // Retry the transfer menu
}
}
// Main function to run the menu
async function main() {
while (true) {
const action = await mainMenu();
await handleAction(action);
}
}
main().catch(console.error).finally(() => {
rl.close();
});