Put in order · Blockchain and Web3 course · Module 7: Contract Interaction
Sorting: Parsing an event from a receipt
Arrange the steps for parsing an event from a transaction receipt:
Items to put in order
- Parse the log: const parsedLog = contract.interface.parseLog(logs[0])
- Get the logs: const logs = receipt.logs
- Send the transaction: const tx = await contract.transfer(to, amount)
- Wait for the receipt: const receipt = await tx.wait()
You can check the correct answer by solving this task in the CodeWorlds game.