/* * Copyright 2024 Circle Internet Group, Inc. All rights reserved. * * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ pragma solidity >=0.8.0; import {IMessageTransmitter} from "./IMessageTransmitter.sol"; import {IReceiver} from "./IMessageTransmitter.sol"; /** * @title IReceiverV2 * @notice Receives messages on the destination chain and forwards them to contracts implementing * IMessageHandlerV2. */ interface IReceiverV2 is IReceiver {} /** * @title IRelayerV2 * @notice Sends messages from the source domain to the destination domain */ interface IRelayerV2 { /** * @notice Sends an outgoing message from the source domain. * @dev Emits a `MessageSent` event with message information. * WARNING: if the `destinationCaller` does not represent a valid address as bytes32, then it will not be possible * to broadcast the message on the destination domain. If set to bytes32(0), anyone will be able to broadcast it. * This is an advanced feature, and using bytes32(0) should be preferred for use cases where a specific destination caller is not required. * @param destinationDomain Domain of destination chain * @param recipient Address of message recipient on destination domain as bytes32 * @param destinationCaller Allowed caller on destination domain (see above WARNING). * @param minFinalityThreshold Minimum finality threshold at which the message must be attested to. * @param messageBody Content of the message, as raw bytes */ function sendMessage( uint32 destinationDomain, bytes32 recipient, bytes32 destinationCaller, uint32 minFinalityThreshold, bytes calldata messageBody ) external; } /** * @title IMessageTransmitterV2 * @notice Interface for V2 message transmitters, which both relay and receive messages. */ interface IMessageTransmitterV2 is IRelayerV2, IReceiverV2, IMessageTransmitter {}