-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not emit events from AbstractTBTCDepositor (#786)
In all cases considered so far, the child contract emits its own events in the functions calling `_initializeDeposit` and `_finalizeDeposit`. The events emitted by child contracts have the advantage of emitting decoded extra data in the parameters. We could emit events from the parent contract as well but they cost gas and we are emitting the same data in child contract events. Also, we sometimes need to be creative in child contracts and come up with other names than `DepositInitialized` and `DepositFinalized` even though that is exactly what happens :) Also, lesson learned today: if there is a contract inheriting from `AbstractTBTCDepositor` and declaring an event with the same name - say `DepositFinalized` - when testing the contract whether the event was emitted, Hardhat will complain this event does not exist in the contract.
- Loading branch information
Showing
2 changed files
with
0 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters