I am listening to the even using Nethereum.
May I know if an event is received means the transaction is confirmed?
If not? How can I know it is failed and perform a rollback?
Ethereum Stack Exchange is a question and answer site for users of Ethereum, the decentralized application platform and smart contract enabled blockchain. It only takes a minute to sign up.Sign up to join this community
"Confirmed" can mean a few different things.
When you see an event, it means the transaction was successfully mined into a block.
Because there's a race to add a block to the end of the blockchain, it's always possible that there are two competing chains for a while. By definition, the longest blockchain is the truth, but if two blocks are mined at almost the same time, it's unclear which will win. This issue settles itself over time as more blocks get added.
People often talk about the "number of confirmations" being the number of blocks that have been added after the block that included your transaction. The more blocks that have been added, the less likely it is that there are two competing chains. It's up to you to decide how many confirmations to wait for.
So a simple answer is "Yes," seeing a transaction receipt (or an event) means that the transaction happened. But the more complex answer is "Blocks can actually disappear if a different chain becomes the longest one," so you may want to wait for a few more blocks before you consider a transaction "confirmed."