blockchaincryptocurrencysubstratepolkadotpolkadot-js

How to query for Polkadot transaction info using only txHash?


I cannot find any description on how to get the transaction info using just the txHash returned by signAndSend() in the API documentation. I think it's a basic function which is really weird that it's not there.

As I can see the only way to track the status of a transaction is using the callback functions of signAndSend() which only viable if the transaction was created from my side. However in block explorers like polkadot.subscan.io or polkascan.io, I can easily find the transaction using just the txHash. Any idea just briefly on how can I implement such a function?


Solution

  • Please consider using a solution such as Substrate Archive to help you index transactions on a Substrate-based chain.