Skip to main content
2 of 2
edited tags
Sid
  • 151
  • 1
  • 9

how to get data from a solana transaction message

I want to access the data of a transaction , for example I want to be able to access the metadata of this token. How do I go about it enter image description here Right now this is what I'm using to get the transaction message

let tx=await connection.getTransaction("5swq5xq6fDMvdo8N3dHWLiTMbR73Qps18BuVrDbuNoWS6PQjtPHcr2Tzv1sBE7hzcnMwNk6aH3MzZG6HWXqv6TdY")
console.log("here", tx?.transaction?.message)

Which gets me this enter image description here

Sid
  • 151
  • 1
  • 9