ICrossDomainMessenger.sol 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. // SPDX-License-Identifier: MIT
  2. // OpenZeppelin Contracts (last updated v4.6.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(
  28. address _target,
  29. bytes calldata _message,
  30. uint32 _gasLimit
  31. ) external;
  32. }