diff --git a/evm/src/NttManager/ManagerBase.sol b/evm/src/NttManager/ManagerBase.sol index f19723af6..506cab3f1 100644 --- a/evm/src/NttManager/ManagerBase.sol +++ b/evm/src/NttManager/ManagerBase.sol @@ -427,8 +427,9 @@ abstract contract ManagerBase is _setTransceiverAttestedToMessage(digest, _getTransceiverInfosStorage()[transceiver].index); emit MessageAttestedTo( - sourceChainId, digest, transceiver, _getTransceiverInfosStorage()[transceiver].index + digest, transceiver, _getTransceiverInfosStorage()[transceiver].index ); + emit MessageAttestedTo(sourceChainId); } /// @dev Returns the bitmap of attestations from enabled transceivers for a given message. diff --git a/evm/src/NttManager/NttManager.sol b/evm/src/NttManager/NttManager.sol index 8ca575999..25e5c716c 100644 --- a/evm/src/NttManager/NttManager.sol +++ b/evm/src/NttManager/NttManager.sol @@ -640,7 +640,8 @@ contract NttManager is INttManager, RateLimiter, ManagerBase { if (cancelled) { emit OutboundTransferCancelled(uint256(digest), recipient, untrimmedAmount); } else { - emit TransferRedeemed(sourceChain, digest); + emit TransferRedeemed(digest); + emit TransferRedeemed(sourceChain); } if (mode == Mode.LOCKING) { diff --git a/evm/src/interfaces/IManagerBase.sol b/evm/src/interfaces/IManagerBase.sol index ec1e5bf83..749e2f86c 100644 --- a/evm/src/interfaces/IManagerBase.sol +++ b/evm/src/interfaces/IManagerBase.sol @@ -33,14 +33,17 @@ interface IManagerBase { /// @notice Emitted when a message has been attested to. /// @dev Topic0 - /// 0xf1ec44311dd9bf51a389c38e415716ad070edf9e303ea55ed7ae11472a5f031d. - /// @param sourceChain The source chain. + /// 0x35a2101eaac94b493e0dfca061f9a7f087913fde8678e7cde0aca9897edba0e5. /// @param digest The digest of the message. /// @param transceiver The address of the transceiver. /// @param index The index of the transceiver in the bitmap. - event MessageAttestedTo( - uint16 indexed sourceChain, bytes32 digest, address transceiver, uint8 index - ); + event MessageAttestedTo(bytes32 digest, address transceiver, uint8 index); + + /// @notice Emitted when a message has been attested to. + /// @dev Topic0 + /// 0x9fbae37d6867991331ee754b07fe4cc479ea8f0cd952e61f450740d6c350e580. + /// @param sourceChain The source chain. + event MessageAttestedTo(uint16 indexed sourceChain); /// @notice Emmitted when the threshold required transceivers is changed. /// @dev Topic0 diff --git a/evm/src/interfaces/INttManager.sol b/evm/src/interfaces/INttManager.sol index ef692c13f..f1f558dbc 100644 --- a/evm/src/interfaces/INttManager.sol +++ b/evm/src/interfaces/INttManager.sol @@ -57,10 +57,16 @@ interface INttManager is IManagerBase { /// @notice Emitted when a transfer has been redeemed /// (either minted or unlocked on the recipient chain). /// @dev Topic0 - /// 0x822760cb8aef838664db98515460929d89d5799b7546e9269dffdc09e2cbb995. - /// @param sourceChain The source chain. + /// 0x504e6efe18ab9eed10dc6501a417f5b12a2f7f2b1593aed9b89f9bce3cf29a91. /// @param digest The digest of the message. - event TransferRedeemed(uint16 indexed sourceChain, bytes32 indexed digest); + event TransferRedeemed(bytes32 indexed digest); + + /// @notice Emitted when a transfer has been redeemed + /// (either minted or unlocked on the recipient chain). + /// @dev Topic0 + /// 0x56b025e18da6f1f65995c2b538c47cabdb4103d11c9bb3ebbacb098d14fa12c6. + /// @param sourceChain The source chain. + event TransferRedeemed(uint16 indexed sourceChain); /// @notice Emitted when an outbound transfer has been cancelled /// @dev Topic0 diff --git a/evm/test/IntegrationStandalone.t.sol b/evm/test/IntegrationStandalone.t.sol index 6e990ce1e..ecaa2b310 100755 --- a/evm/test/IntegrationStandalone.t.sol +++ b/evm/test/IntegrationStandalone.t.sol @@ -184,7 +184,7 @@ contract TestEndToEndBase is Test, IRateLimiterEvents { vm.stopPrank(); - // Get the TransferSent(bytes32) event digest to ensure it matches up with the TransferRedeemed(uint16,bytes32) event digest later + // Get the TransferSent(bytes32) event to ensure it matches up with the TransferRedeemed(bytes32) event later Vm.Log[] memory recordedLogs = vm.getRecordedLogs(); bytes32 sentEventDigest; for (uint256 i = 0; i < recordedLogs.length; i++) { @@ -220,24 +220,18 @@ contract TestEndToEndBase is Test, IRateLimiterEvents { ); } - // Get the TransferRedeemed(uint16,bytes32) event digest to ensure it matches up with the TransferSent(bytes32) event digest earlier + // Get the TransferRedeemed(bytes32) event to ensure it matches up with the TransferSent(bytes32) event earlier recordedLogs = vm.getRecordedLogs(); bytes32 recvEventDigest; - bytes32 recvSourceChain; for (uint256 i = 0; i < recordedLogs.length; i++) { - if (recordedLogs[i].topics[0] == keccak256("TransferRedeemed(uint16,bytes32)")) { - recvSourceChain = recordedLogs[i].topics[1]; - recvEventDigest = recordedLogs[i].topics[2]; + if (recordedLogs[i].topics[0] == keccak256("TransferRedeemed(bytes32)")) { + recvEventDigest = recordedLogs[i].topics[1]; break; } } - require( - recvSourceChain == bytes32(uint256(chainId1)), - "Incorrect TransferRedeemed(uint16,bytes32) event sourceChain" - ); require( sentEventDigest == recvEventDigest, - "TransferRedeemed(uint16,bytes32) event digest should match TransferSent(bytes32) event digest" + "TransferRedeemed(bytes32) event should match TransferSent(bytes32)" ); // Can't resubmit the same message twice