Closed asiaziola closed 2 years ago
Currently, it is only possible to get the tags for interaction input. Add method which mimics following code and enables encoding tags for any tx.
const response = await fetch(`https://gateway.redstone.finance/gateway/contract?txId=${result.contractTxId}`); const contractTx = new Transaction((await response.json()).contractTx); let allTags = []; contractTx.get("tags").forEach((tag) => { let key = tag.get("name", {decode: true, string: true}); let value = tag.get("value", {decode: true, string: true}); allTags.push({key, value,}); }); console.dir(allTags, {depth: null});
Keep in mind that currently the TagsParsers assume that tags are already decoded.
Currently, it is only possible to get the tags for interaction input. Add method which mimics following code and enables encoding tags for any tx.