I'm trying to submit a transaction to mint an NFT for users and get the token ID from the confirmed transaction logs. Right now, I have an event listener monitoring the events of the contract after sending the transaction to the Relayer. However, our server will only monitor for up to 2 minutes before it times out.
I'm wondering if there is a way to have the Defender Sentinel to monitor events and use the transaction ID, provided by the Relayer, to match a specific transaction hash?
What would be the best method for using the Sentinel to monitor and match a specific transaction with a previously provided transaction ID?
Environment
Relayer and Autotask
Submitting a signed NFT minting request to the Relayer through an autotask to mint to the user for free with no gas.
Details
Using an event listener is not the ideal way for us to monitor for a completed transaction in order to retrieve the token ID from the event logs. This could fail in the case a transaction takes too long to confirm on chain.
I know the Sentinels can monitor events for transactions. However, the Relayer provides us a transaction ID in order to query the transaction hash. But the transaction ID does not exist in the transaction that the Sentinel picks up.
We need a way to match the confirmed minting transaction the Relayer sends to pull the specific token ID from the event logs in order to save it to our DB for reference. The Sentinel seems like a good solution to monitor for this event but we can't know if the transaction it picks up is the exact transaction the Relayer sent using the transaction ID provided. In the case of multiple people minting simultaneously, we may not be able to correctly match IDs with transaction hashes if any are dropped. And I'm not sure there's a way to submit data to an Autotask connected to a Sentinel to cross reference such information.
Code to reproduce