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/MockOutbox.sol

30 lines
698 B

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {MockInbox} from "./MockInbox.sol";
import {TypeCasts} from "../libs/TypeCasts.sol";
contract MockOutbox {
MockInbox inbox;
uint32 domain;
using TypeCasts for address;
constructor(uint32 _domain, address _inbox) {
domain = _domain;
inbox = MockInbox(_inbox);
}
function dispatch(
uint32,
bytes32 _recipientAddress,
bytes calldata _messageBody
) external returns (uint256) {
inbox.addPendingMessage(
domain,
msg.sender.addressToBytes32(),
_recipientAddress,
_messageBody
);
return 1;
}
}