Hi @hellopath,
… and welcome to the forum! I hope you’re enjoying the course
The additional balanceAdded() emit statement you’ve added to the transfer() function is coded correctly. You’ve placed it in the correct position in the function body and it will log data relating to a transfer whenever the transfer() function is successfully executed.
It is certainly always a good idea to consider whether we can re-use the same event declaration to emit event data from more than one function. However, do you think it’s appropriate to do this here?
While the addBalance() function executes a transaction that only involves 1 user address (the depositer), the transfer() function executes a transaction that involves 2 user addresses (the sender and the recipient). So, it would be useful to include the sender’s address, as well as the recipient’s address, within the data emitted for the transfer event. This obviously involves including a separate event declaration with 3 instead of 2 parameters.
It is also important to consider whether the names given to the event and to each of its parameters are suitable and helpful in terms of the transaction data they describe.
By the way, don’t forget to post your solution to the Data Location Assignment. This assignment comes just before the Events Assignment, near the beginning of the same Additional Solidity Concepts section of the course.
Just let me know if you have any questions.