From 46f1d1f55f2d4e5731ee485f62cfad62297ab333 Mon Sep 17 00:00:00 2001 From: Alessandro Manfredi Date: Wed, 17 Apr 2024 10:29:23 +0200 Subject: [PATCH] feat(interfaces): adds hashi interfaces --- contracts/interfaces/hashi/IAdapter.sol | 5 +++++ contracts/interfaces/hashi/IReporter.sol | 15 +++++++++++++++ contracts/interfaces/hashi/IYaho.sol | 15 +++++++++++++++ 3 files changed, 35 insertions(+) create mode 100644 contracts/interfaces/hashi/IAdapter.sol create mode 100644 contracts/interfaces/hashi/IReporter.sol create mode 100644 contracts/interfaces/hashi/IYaho.sol diff --git a/contracts/interfaces/hashi/IAdapter.sol b/contracts/interfaces/hashi/IAdapter.sol new file mode 100644 index 000000000..23df3bd41 --- /dev/null +++ b/contracts/interfaces/hashi/IAdapter.sol @@ -0,0 +1,5 @@ +pragma solidity 0.4.24; + +interface IAdapter { + function getHash(uint256 domain, uint256 id) external view returns (bytes32 hash); +} \ No newline at end of file diff --git a/contracts/interfaces/hashi/IReporter.sol b/contracts/interfaces/hashi/IReporter.sol new file mode 100644 index 000000000..2db3a7381 --- /dev/null +++ b/contracts/interfaces/hashi/IReporter.sol @@ -0,0 +1,15 @@ +pragma solidity 0.4.24; + +import "./IAdapter.sol"; + +interface IReporter { + function dispatchBlocks(uint256 targetChainId, IAdapter adapter, uint256[] blockNumbers) + external + payable + returns (bytes32); + + function dispatchMessages(uint256 targetChainId, IAdapter adapter, uint256[] messageIds, bytes32[] messageHashes) + external + payable + returns (bytes32); +} \ No newline at end of file diff --git a/contracts/interfaces/hashi/IYaho.sol b/contracts/interfaces/hashi/IYaho.sol new file mode 100644 index 000000000..0f70e934a --- /dev/null +++ b/contracts/interfaces/hashi/IYaho.sol @@ -0,0 +1,15 @@ +pragma solidity 0.4.24; + +import "./IAdapter.sol"; +import "./IReporter.sol"; + +interface IYaho { + function dispatchMessage( + uint256 targetChainId, + uint256 threshold, + address receiver, + bytes data, + IReporter[] reporters, + IAdapter[] adapters + ) external returns (uint256); +} \ No newline at end of file