diff --git a/packages/evm/contracts/interfaces/IBlockHashOracleAdapter.sol b/packages/evm/contracts/interfaces/IBlockHashOracleAdapter.sol index 9bf8154a..09fb6020 100644 --- a/packages/evm/contracts/interfaces/IBlockHashOracleAdapter.sol +++ b/packages/evm/contracts/interfaces/IBlockHashOracleAdapter.sol @@ -3,10 +3,15 @@ pragma solidity ^0.8.17; import { IOracleAdapter } from "./IOracleAdapter.sol"; +/** + * @title IBlockHashOracleAdapter + */ interface IBlockHashOracleAdapter is IOracleAdapter { - /// @dev Proves and stores valid ancestral block hashes for a given chain ID. - /// @param chainId The ID of the chain to prove block hashes for. - /// @param blockHeaders The RLP encoded block headers to prove the hashes for. - /// @notice Block headers should be ordered by descending block number and should start with a known block header. + /** + * @dev Proves and stores valid ancestral block hashes for a given chain ID. + * @param chainId - The ID of the chain to prove block hashes for. + * @param blockHeaders - The RLP encoded block headers to prove the hashes for. + * @notice Block headers should be ordered by descending block number and should start with a known block header. + */ function proveAncestralBlockHashes(uint256 chainId, bytes[] memory blockHeaders) external; } diff --git a/packages/evm/contracts/interfaces/IHeaderStorage.sol b/packages/evm/contracts/interfaces/IHeaderStorage.sol index 8d4221d7..05613f85 100644 --- a/packages/evm/contracts/interfaces/IHeaderStorage.sol +++ b/packages/evm/contracts/interfaces/IHeaderStorage.sol @@ -1,6 +1,9 @@ // SPDX-License-Identifier: LGPL-3.0-only pragma solidity ^0.8.17; +/** + * @title IHeaderStorage + */ interface IHeaderStorage { error HeaderOutOfRange(address emitter, uint256 blockNumber); diff --git a/packages/evm/contracts/interfaces/IOracleAdapter.sol b/packages/evm/contracts/interfaces/IOracleAdapter.sol index e67f93d9..18d1bb5a 100644 --- a/packages/evm/contracts/interfaces/IOracleAdapter.sol +++ b/packages/evm/contracts/interfaces/IOracleAdapter.sol @@ -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); } diff --git a/packages/evm/contracts/interfaces/IYaho.sol b/packages/evm/contracts/interfaces/IYaho.sol index 18280d6c..2712526a 100644 --- a/packages/evm/contracts/interfaces/IYaho.sol +++ b/packages/evm/contracts/interfaces/IYaho.sol @@ -7,6 +7,9 @@ import { Message } from "./IMessage.sol"; import { IReporter } from "./IReporter.sol"; import { IOracleAdapter } from "./IOracleAdapter.sol"; +/** + * @title IYaho + */ interface IYaho is IMessageHashCalculator, IMessageIdCalculator { error NoMessagesGiven(); error NoMessageIdsGiven();