Skip to content

Instantly share code, notes, and snippets.

View lordace-coder's full-sized avatar
🎯
Focusing

LordAce lordace-coder

🎯
Focusing
View GitHub Profile
@lordace-coder
lordace-coder / trc20.js
Created October 14, 2024 09:53 — forked from andelf/trc20.js
Get TRC20 balance and transfer USDT tokens
const TronWeb = require('tronweb');
const HttpProvider = TronWeb.providers.HttpProvider;
const fullNode = new HttpProvider("https://api.trongrid.io");
// const fullNode = new HttpProvider("http://192.168.1.162:8090");
const solidityNode = new HttpProvider("https://api.trongrid.io");
const eventServer = new HttpProvider("https://api.trongrid.io");
const privateKey = "3481E79956D4BD95F358AC96D151C976392FC4E3FC132F78A847906DE588C145";
const tronWeb = new TronWeb(fullNode, solidityNode, eventServer, privateKey);