In my personal experience, I would use code like this to track the result of a transaction:
=== Your Code Parameters ===
.....
console.log("============================");
console.log("Interacting with Collection Contract: \n" + contract_address);
let seqno: number = await wallet_address.getSeqno();
let transfer = await wallet_address.sendTransfer({
seqno: seqno,
secretKey: keyPair.secretKey,
messages: [
internal({
value: toNano("0.75"),
to: contract_address,
init: { code: init.code, data: init.data },
bounce: true,
body: packed,
}),
],
});
console.log("Transaction sent. Waiting for confirmation...");
let intervalId = setInterval(async () => {
let seqno2 = await wallet_address.getSeqno();
if (seqno2 > seqno) {
console.log("✅ Transaction confirmed!\n");
clearInterval(intervalId);
}
}, 1000);
To wait for the seqno
back, you can confirm that the transaction has been packed by the validator. I hope this is helpful."