Put in order · Blockchain and Web3 course · Module 4: ethers.js & viem
Try-Catch in Transactions
Arrange the structure for error handling in a transaction:
Items to put in order
- catch (error) { check the error type }
- Display an appropriate message to the user
- try { send transaction }
You can check the correct answer by solving this task in the CodeWorlds game.