Add replay protection

light-optimistic
Yorke Rhodes 1 month ago
parent 1c0410f10b
commit 5c808b604b
No known key found for this signature in database
GPG Key ID: 9876451F25A3B38C
  1. 4
      solidity/contracts/isms/hook/OptimisticIsm.sol

@ -42,6 +42,10 @@ contract OptimisticIsm is IInterchainSecurityModule {
uint8(IInterchainSecurityModule.Types.NULL);
function verifyMessageId(bytes32 messageId) external {
require(
preverifiedMessages[messageId] == 0,
"OptimisticIsm: message already preverified"
);
preverifiedMessages[messageId] = uint48(block.timestamp);
}

Loading…
Cancel
Save