Skip to content

Commit

Permalink
feat(protocol): add transactor to Bridge's MessageStatusChanged event (
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Feb 10, 2023
1 parent 2d8b498 commit cbc0da6
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/protocol/contracts/bridge/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ contract Bridge is EssentialContract, IBridge {

event MessageStatusChanged(
bytes32 indexed msgHash,
LibBridgeStatus.MessageStatus status
LibBridgeStatus.MessageStatus status,
address transactor
);

event DestChainEnabled(uint256 indexed chainId, bool enabled);
Expand Down
12 changes: 10 additions & 2 deletions packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ library LibBridgeStatus {
FAILED
}

event MessageStatusChanged(bytes32 indexed msgHash, MessageStatus status);
event MessageStatusChanged(
bytes32 indexed msgHash,
MessageStatus status,
address transactor
);

/**
* @dev If messageStatus is same as in the messageStatus mapping,
Expand All @@ -38,7 +42,11 @@ library LibBridgeStatus {
) internal {
if (getMessageStatus(msgHash) != status) {
_setMessageStatus(msgHash, status);
emit LibBridgeStatus.MessageStatusChanged(msgHash, status);
emit LibBridgeStatus.MessageStatusChanged(
msgHash,
status,
msg.sender
);
}
}

Expand Down

0 comments on commit cbc0da6

Please sign in to comment.