-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
53 lines (41 loc) · 1.35 KB
/
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
// const sequelize = require('./db');
const fs = require('fs')
require("dotenv").config()
// const { UserTg } = require('./models');
const { operateBotFromPlatForm } = require('./utils')
try{
operateBotFromPlatForm(process.env.platForm, process.env.robotToken, process.env.clientId)
}catch(e){
console.log(e)
}
// const sendToken = async(chatId, address, isInsertFlag) => {
// try{
// sendMsg(chatId, 'Transferring...')
// // TODO:
// // await send token by contracts
// // const txStatus = getTxRs(transactionId)
// if(isInsertFlag){
// await insertItem(chatId, address, config.platForm, transactionId, txStatus)
// }else {
// if(txStatus === 'mined'){
// await updateItem(chatId, address)
// }
// }
// if(txStatus === 'mined'){
// sendMsg(chatId, `Sending 1 to ${address}, Please pay attention to check`)
// } else {
// sendMsg(chatId, 'Transaction is not mined yet, please try again later')
// }
// }catch(e){
// throw Error('insert or update data fail')
// }
// }
// const start = async () => {
// try {
// await sequelize.authenticate()
// await sequelize.sync()
// } catch (e) {
// console.log('sequelize error', e)
// }
// }
// start()