ICrossDomainMessenger.sol 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts (last updated v4.9.0) (vendor/optimism/ICrossDomainMessenger.sol)
  3. pragma solidity >0.5.0 <0.9.0;
  4. /**
  5. * @title ICrossDomainMessenger
  6. */
  7. interface ICrossDomainMessenger {
  8. /**********
  9. * Events *
  10. **********/
  11. event SentMessage(address indexed target, address sender, bytes message, uint256 messageNonce, uint256 gasLimit);
  12. event RelayedMessage(bytes32 indexed msgHash);
  13. event FailedRelayedMessage(bytes32 indexed msgHash);
  14. /*************
  15. * Variables *
  16. *************/
  17. function xDomainMessageSender() external view returns (address);
  18. /********************
  19. * Public Functions *
  20. ********************/
  21. /**
  22. * Sends a cross domain message to the target messenger.
  23. * @param _target Target contract address.
  24. * @param _message Message to send to the target.
  25. * @param _gasLimit Gas limit for the provided message.
  26. */
  27. function sendMessage(address _target, bytes calldata _message, uint32 _gasLimit) external;
  28. }