-
Notifications
You must be signed in to change notification settings - Fork 57
/
index.js
38 lines (32 loc) · 935 Bytes
/
index.js
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
require('colors');
const readlineSync = require('readline-sync');
const { displayHeader } = require('./utils/display');
const scriptCommands = {
0: 'npm run arbt',
1: 'npm run opsp',
};
const scriptNames = {
0: 'Auto Bridge From Arbitrum Sepolia',
1: 'Auto Bridge From Optimism Sepolia',
};
displayHeader();
console.log(
'Welcome to the T3rn Auto Bridge Bot by Happy Cuan Airdrop!'.bold.green
);
console.log('');
console.log('Please choose a script to run:'.underline);
Object.keys(scriptNames).forEach((key) => {
console.log(`${key}: ${scriptNames[key].yellow}`);
});
const userChoice = parseInt(
readlineSync.question('\nChoose a script number: \n'.cyan),
10
);
if (scriptCommands.hasOwnProperty(userChoice)) {
console.log(`\nPlease run: \n${scriptCommands[userChoice]}`.blue);
console.log('');
} else {
console.log(
'Invalid choice! Please run the script again and choose a valid number.'.red
);
}