ICrossDomainMessenger.sol 989 B

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