I'm currently writing script to track wallet address by using connection.onLogs , and when i got the signature i called getParsedTransaction hoping to get the transaction details such as what wallet address initialize the transaction, what kind of transaction is it? swap, transfer or interact with a program? if swap what token was use to swap for what token? what's the amount? if it's transfer what token did the user transfer? what's the amount, what's the wallet address was used to send and receive and so on. when i console log the response from getParsedTransaction i keep getting different data field for each pair below, so i'm not sure how i can get these information if the data returned field changes everytime
// transaction signatures that i've been testing // failed sol/wif 3Zy8QA34fFEQ3dj8QySZz8ckBeDSRtVoFeVkvH8bx4J6aGXDQ6ks2iYd7hWSF4ENw3ak5ZhfMyppQiZjjpYFVdVy // success sol/wen H4GKYobNaSawaCkbu7Wcz7BL75FiZJXKS5vQvwuiNGbphAfBguYCVwxKjFb73e7MhB4qbf9fpL9M9WXUicnL9is // success wen/sol n7smLz4Z3uER45FbANJNWpqnukedVY3kqF1act3dAJ4ivSmQF5NQWosvegoKo2pGuRwYEdtWa43CamsnAPY1hTU // success usdc/sol imMSBZ1RASauuih51BN1hTnZx41f8QnEz7cAWa8K4CPaufCeLM2R5kKr5WJRJLo8JESoHELLjbPdjFjZuvQv1d6 // transfer cAkhXMsUcLTyUmNkFTNSRfCTVeToAqkooYo8QHmYcokAVj2XaDzHycB4Ytafx8acYusHp76YXJFm6ypN9GzCuVq const transaction = await connection.getParsedTransaction( `H4GKYobNaSawaCkbu7Wcz7BL75FiZJXKS5vQvwuiNGbphAfBguYCVwxKjFb73e7MhB4qbf9fpL9M9WXUicnL9is `, { maxSupportedTransactionVersion: 0 }, );