IOutbox.sol 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // SPDX-License-Identifier: Apache-2.0
  2. /*
  3. * Copyright 2021, Offchain Labs, Inc.
  4. *
  5. * Licensed under the Apache License, Version 2.0 (the "License");
  6. * you may not use this file except in compliance with the License.
  7. * You may obtain a copy of the License at
  8. *
  9. * http://www.apache.org/licenses/LICENSE-2.0
  10. *
  11. * Unless required by applicable law or agreed to in writing, software
  12. * distributed under the License is distributed on an "AS IS" BASIS,
  13. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. * See the License for the specific language governing permissions and
  15. * limitations under the License.
  16. */
  17. pragma solidity ^0.8.0;
  18. interface IOutbox {
  19. event OutboxEntryCreated(
  20. uint256 indexed batchNum,
  21. uint256 outboxEntryIndex,
  22. bytes32 outputRoot,
  23. uint256 numInBatch
  24. );
  25. event OutBoxTransactionExecuted(
  26. address indexed destAddr,
  27. address indexed l2Sender,
  28. uint256 indexed outboxEntryIndex,
  29. uint256 transactionIndex
  30. );
  31. function l2ToL1Sender() external view returns (address);
  32. function l2ToL1Block() external view returns (uint256);
  33. function l2ToL1EthBlock() external view returns (uint256);
  34. function l2ToL1Timestamp() external view returns (uint256);
  35. function l2ToL1BatchNum() external view returns (uint256);
  36. function l2ToL1OutputId() external view returns (bytes32);
  37. function processOutgoingMessages(bytes calldata sendsData, uint256[] calldata sendLengths) external;
  38. function outboxEntryExists(uint256 batchNum) external view returns (bool);
  39. }