Skip to content

Commit

Permalink
Merge pull request #1 from solguru310/dev
Browse files Browse the repository at this point in the history
Update Solana Pumpfun Wallet Tracking Telegram Bot's utils.ts
  • Loading branch information
solguru310 authored Dec 19, 2024
2 parents a2416da + e3b59d3 commit a20c68d
Showing 1 changed file with 2 additions and 21 deletions.
23 changes: 2 additions & 21 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,10 @@ export async function getTransactionDetails(
const balanceChange = (postBalances[0] - preBalances[0]) / LAMPORTS_PER_SOL;

const details = {
signature,
timestamp,
balanceChange: `${balanceChange} SOL`,
sender: txn.transaction.message.accountKeys[0].pubkey.toString(),
instructions: instructions.map((ix: any) => {
if ("parsed" in ix) {
return {
program: ix.program,
type: ix.parsed.type,
receiver: ix.parsed.info.destination,
};
}
return {
programId: ix.programId.toString(),
};
}),
logs: txn.meta.logs,
};

return details;
....
}
}

export const txnLink = (txn: string) => {
return `<a href="https://solscan.io/tx/${txn}">Transaction Link</a>`;
};
};

0 comments on commit a20c68d

Please sign in to comment.