From cbc0da6fa2fd2cd838070fe07869a88039740032 Mon Sep 17 00:00:00 2001 From: Daniel Wang <99078276+dantaik@users.noreply.github.com> Date: Fri, 10 Feb 2023 11:43:33 +0800 Subject: [PATCH] feat(protocol): add transactor to Bridge's MessageStatusChanged event (#13126) --- packages/protocol/contracts/bridge/Bridge.sol | 3 ++- .../contracts/bridge/libs/LibBridgeStatus.sol | 12 ++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/packages/protocol/contracts/bridge/Bridge.sol b/packages/protocol/contracts/bridge/Bridge.sol index bd1f8dd014e..86b2d7a5849 100644 --- a/packages/protocol/contracts/bridge/Bridge.sol +++ b/packages/protocol/contracts/bridge/Bridge.sol @@ -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); diff --git a/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol b/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol index 19e5404633e..f93e435c5a2 100644 --- a/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol +++ b/packages/protocol/contracts/bridge/libs/LibBridgeStatus.sol @@ -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, @@ -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 + ); } }