Getting confirmed transaction

I know that even if the transaction is completed in Ethereum, my transaction can be canceled depending on the situation. As far as I know, we need to check the transaction to prevent this (ex. confirm after 6 transactions).Is there a way to check the confirmed transaction other than waiting? I’m curious about certain situation subscriptions or methods provided by infura.

@present0124

Thanks for reaching out. You can get the status of a confirmed transactions using this method to return
a receipt:

eth_getTransactionReceipt

If you are trying to see how many confirmations on the tx then you would take current blocknumber minus the tx’s blocknumber:

eth_getTransactionByBlockNumberAndIndex

Please let me know if this helps.
Alex | Infura Support

I checked the functions you suggested,
This just seems to signal the end of the transaction.

I need a way to know about the forked situation like the link above.

@present0124

The closest RPC method we have available is eth.getTransactionCount I do not think there is a way to notify you about a chain reorg, etc. Let me check in with the rest of the team and see if there is a way to detect forked bloc\k and get back to you.

Kind regards,
Alex | Infura Support