Skip to content

Commit

Permalink
evm: Pass sourceChainId from function param to MessageAttestedTo
Browse files Browse the repository at this point in the history
…event
  • Loading branch information
nvsriram committed Dec 5, 2024
1 parent 037a2d6 commit 01c2ef1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions evm/src/NttManager/ManagerBase.sol
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ abstract contract ManagerBase is
) {
revert TransceiverAlreadyAttestedToMessage(nttManagerMessageHash);
}
_setTransceiverAttestedToMessage(nttManagerMessageHash, msg.sender);
_setTransceiverAttestedToMessage(sourceChainId, nttManagerMessageHash, msg.sender);

return nttManagerMessageHash;
}
Expand Down Expand Up @@ -419,11 +419,15 @@ abstract contract ManagerBase is
_getMessageAttestationsStorage()[digest].attestedTransceivers |= uint64(1 << index);
}

function _setTransceiverAttestedToMessage(bytes32 digest, address transceiver) internal {
function _setTransceiverAttestedToMessage(
uint16 sourceChainId,
bytes32 digest,
address transceiver
) internal {
_setTransceiverAttestedToMessage(digest, _getTransceiverInfosStorage()[transceiver].index);

emit MessageAttestedTo(
chainId, digest, transceiver, _getTransceiverInfosStorage()[transceiver].index
sourceChainId, digest, transceiver, _getTransceiverInfosStorage()[transceiver].index
);
}

Expand Down

0 comments on commit 01c2ef1

Please sign in to comment.