The home for Hyperlane core contracts, sdk packages, and other infrastructure
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
hyperlane-monorepo/solidity/contracts/mock/MockERC5164.sol

26 lines
728 B

// SPDX-License-Identifier: MIT or Apache-2.0
pragma solidity ^0.8.13;
import {IMessageDispatcher} from "../hooks/ERC5164/interfaces/IMessageDispatcher.sol";
contract MockMessageDispatcher is IMessageDispatcher {
function dispatchMessage(
uint256 toChainId,
address to,
bytes calldata data
) external returns (bytes32) {
bytes32 messageId = keccak256(abi.encodePacked(toChainId, to, data));
// simulate a successful dispatch
emit MessageDispatched(messageId, msg.sender, toChainId, to, data);
return messageId;
}
}
contract MockMessageExecutor {
event MessageIdExecuted(
uint256 indexed fromChainId,
bytes32 indexed messageId
);
}