INNER CODE UNIT · TypeScript
ui
bitman09/pumpfun-sniper-bot · src/burn.ts:150
const ui = Number(row.amount) / 10 ** row.decimals;
console.log(
` ${row.mint.toBase58().slice(0, 8)}... | ${ui} tokens | ${row.pubkey.toBase58().slice(0, 8)}...`
);
}
console.log("\nBurning all balances and closing accounts...\n");
let burned = 0;
let failed = 0;
for (let i = 0; i < rows.length; i += BATCH_SIZE) {
const batch = rows.slice(i, i + BATCH_SIZE);
const batchIx: TransactionInstruction[] = [];
for (const row of batch) {
batchIx.push(...(await buildBurnCloseInstructions(row, payer.publicKey)));
}