Decouple core interfaces for use in applications (#328)
parent
fec07d21fe
commit
e364d4d741
@ -0,0 +1,11 @@ |
||||
// SPDX-License-Identifier: MIT OR Apache-2.0 |
||||
pragma solidity >=0.6.11; |
||||
|
||||
interface ICommon { |
||||
function localDomain() external view returns (uint32); |
||||
|
||||
function latestCheckpoint() |
||||
external |
||||
view |
||||
returns (bytes32 root, uint256 index); |
||||
} |
@ -0,0 +1,20 @@ |
||||
// SPDX-License-Identifier: MIT OR Apache-2.0 |
||||
pragma solidity >=0.6.11; |
||||
|
||||
import {ICommon} from "./ICommon.sol"; |
||||
|
||||
interface IInbox is ICommon { |
||||
function checkpoint( |
||||
bytes32 _root, |
||||
uint256 _index, |
||||
bytes calldata _signature |
||||
) external; |
||||
|
||||
function remoteDomain() external returns (uint32); |
||||
|
||||
function proveAndProcess( |
||||
bytes calldata _message, |
||||
bytes32[32] calldata _proof, |
||||
uint256 _index |
||||
) external; |
||||
} |
@ -0,0 +1,14 @@ |
||||
// SPDX-License-Identifier: MIT OR Apache-2.0 |
||||
pragma solidity >=0.6.11; |
||||
|
||||
import {ICommon} from "./ICommon.sol"; |
||||
|
||||
interface IOutbox is ICommon { |
||||
function dispatch( |
||||
uint32 _destinationDomain, |
||||
bytes32 _recipientAddress, |
||||
bytes calldata _messageBody |
||||
) external returns (uint256); |
||||
|
||||
function checkpoint() external; |
||||
} |
Loading…
Reference in new issue