Skip to content

Commit

Permalink
change event to DepositMessageDelivered
Browse files Browse the repository at this point in the history
only emit this event for deposit messages to save gas
  • Loading branch information
tsite committed Dec 7, 2023
1 parent 8de43f4 commit 39511bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/bridge/AbsBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,9 @@ abstract contract AbsBridge is Initializable, DelegateCallAware, IBridge {
baseFeeL1,
blockTimestamp
);
emit MessageDeliveredV2(kind, sender);
if (kind == L1MessageType_ethDeposit) {
emit DepositMessageDelivered(sender);
}
return count;
}

Expand Down
2 changes: 1 addition & 1 deletion src/bridge/IBridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ interface IBridge {
uint64 timestamp
);

event MessageDeliveredV2(uint8 indexed kind, address indexed sender);
event DepositMessageDelivered(address indexed sender);

event BridgeCallTriggered(
address indexed outbox,
Expand Down

0 comments on commit 39511bb

Please sign in to comment.