I created my own Pallet to save Student certificates, then I am reading the Storage to retrieve the certificates that I have stored in BC using Plokadot.js, this is the code for read the certificate from BC:
let cerIds = await api.query.templateModule.certificateOwned(
account.address
);
let cerDetails = await Promise.all(
cerIds.map(async (id) => {
return await api.query.templateModule.certificates(id);
})
);
In the Certificate, I am storing the following data :
- Certificate ID
- Student Information
I am not storing any data related to Transaction hash.
Now the question is:
How I can get the transaction hash for each certificate that has been stored in Storage, the purpose is I need to create URL pointing the transaction detail that can be viewed in https://polkadot.js.org/apps/#/explorer