generated from PaulRBerg/hardhat-template
-
Notifications
You must be signed in to change notification settings - Fork 52
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(evm): normalizes interfaces
- Loading branch information
1 parent
1183fb1
commit b2d2324
Showing
4 changed files
with
27 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,22 @@ | ||
// SPDX-License-Identifier: LGPL-3.0-only | ||
pragma solidity ^0.8.17; | ||
|
||
/** | ||
* @title IOracleAdapter | ||
*/ | ||
interface IOracleAdapter { | ||
event HashStored(uint256 indexed id, bytes32 indexed hashes); | ||
|
||
error InvalidBlockHeaderLength(uint256 length); | ||
error InvalidBlockHeaderRLP(); | ||
error ConflictingBlockHeader(uint256 blockNumber, bytes32 reportedBlockHash, bytes32 storedBlockHash); | ||
|
||
/// @dev Returns the hash for a given ID, as reported by the oracle. | ||
/// @param domain Identifier for the domain to query. | ||
/// @param id Identifier for the ID to query. | ||
/// @return hash Bytes32 hash reported by the oracle for the given ID on the given domain. | ||
/// @notice MUST return bytes32(0) if the oracle has not yet reported a hash for the given ID. | ||
event HashStored(uint256 indexed id, bytes32 indexed hashes); | ||
|
||
/** | ||
* @dev Returns the hash for a given ID, as reported by the oracle. | ||
* @param domain - Identifier for the domain to query. | ||
* @param id - Identifier for the ID to query. | ||
* @return hash Bytes32 hash reported by the oracle for the given ID on the given domain. | ||
* @notice MUST return bytes32(0) if the oracle has not yet reported a hash for the given ID. | ||
*/ | ||
function getHashFromOracle(uint256 domain, uint256 id) external view returns (bytes32 hash); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters