diff --git a/solidity/contracts/Module.sol b/solidity/contracts/Module.sol index 306bcd3..0250eb3 100644 --- a/solidity/contracts/Module.sol +++ b/solidity/contracts/Module.sol @@ -6,6 +6,10 @@ import {IOracle} from '../interfaces/IOracle.sol'; import {Validator} from './Validator.sol'; +/** + * @title Module + * @notice abstract contract implemented by all Modules + */ abstract contract Module is Validator, IModule { constructor(IOracle _oracle) Validator(_oracle) {} diff --git a/solidity/contracts/Oracle.sol b/solidity/contracts/Oracle.sol index 9283cb9..c18784f 100644 --- a/solidity/contracts/Oracle.sol +++ b/solidity/contracts/Oracle.sol @@ -13,6 +13,10 @@ import {ValidatorLib} from '../libraries/ValidatorLib.sol'; import {OracleAccessController} from './access/OracleAccessController.sol'; import {OracleTypehash} from './utils/OracleTypehash.sol'; +/** + * @title Oracle + * @notice Source of truth for applications built on top of Prophet + */ contract Oracle is IOracle, OracleAccessController { using ValidatorLib for *; diff --git a/solidity/contracts/access/CommonAccessController.sol b/solidity/contracts/access/CommonAccessController.sol index 5c8766f..d572f6a 100644 --- a/solidity/contracts/access/CommonAccessController.sol +++ b/solidity/contracts/access/CommonAccessController.sol @@ -4,6 +4,10 @@ pragma solidity ^0.8.19; import {IAccessController} from '../../interfaces/access/IAccessController.sol'; import {IAccessModule} from '../../interfaces/modules/access/IAccessModule.sol'; +/** + * @title CommonAccessController + * @notice abstract contract implemented by AccessControllers + */ abstract contract CommonAccessController is IAccessController { /** * @notice Check whether the caller is authorized for the given parameters. diff --git a/solidity/contracts/access/ModuleAccessController.sol b/solidity/contracts/access/ModuleAccessController.sol index 7a82508..2bdb954 100644 --- a/solidity/contracts/access/ModuleAccessController.sol +++ b/solidity/contracts/access/ModuleAccessController.sol @@ -6,6 +6,10 @@ import {IModuleAccessController} from '../../interfaces/access/IModuleAccessCont import {Module} from '../Module.sol'; import {CommonAccessController} from './CommonAccessController.sol'; +/** + * @title ModuleAccessController + * @notice abstract contract to manage access control at the Modules level + */ abstract contract ModuleAccessController is IModuleAccessController, CommonAccessController, Module { constructor(IOracle _oracle) Module(_oracle) {} diff --git a/solidity/contracts/access/OracleAccessController.sol b/solidity/contracts/access/OracleAccessController.sol index cdca1b6..b297f4a 100644 --- a/solidity/contracts/access/OracleAccessController.sol +++ b/solidity/contracts/access/OracleAccessController.sol @@ -4,6 +4,10 @@ pragma solidity ^0.8.19; import {IOracleAccessController} from '../../interfaces/access/IOracleAccessController.sol'; import {CommonAccessController} from './CommonAccessController.sol'; +/** + * @title OracleAccessController + * @notice abstract contract to manage access control at the Oracle level + */ abstract contract OracleAccessController is IOracleAccessController, CommonAccessController { /// @inheritdoc IOracleAccessController mapping(address _user => mapping(address _accessModule => bool _approved)) public isAccessModuleApproved; diff --git a/solidity/contracts/utils/OracleTypehash.sol b/solidity/contracts/utils/OracleTypehash.sol index 77ae352..63ba0fe 100644 --- a/solidity/contracts/utils/OracleTypehash.sol +++ b/solidity/contracts/utils/OracleTypehash.sol @@ -1,6 +1,9 @@ // SPDX-License-Identifier: MIT pragma solidity ^0.8.19; +/** + * @title OracleTypehash + */ library OracleTypehash { bytes32 public constant CREATE_TYPEHASH = keccak256('createRequest(Request _request,bytes32 _ipfsHash,AccessControl _accessControl'); diff --git a/solidity/interfaces/modules/dispute/IDisputeModule.sol b/solidity/interfaces/modules/dispute/IDisputeModule.sol index 7bc8d3f..2a579d0 100644 --- a/solidity/interfaces/modules/dispute/IDisputeModule.sol +++ b/solidity/interfaces/modules/dispute/IDisputeModule.sol @@ -4,6 +4,10 @@ pragma solidity ^0.8.19; import {IModule} from '../../IModule.sol'; import {IOracle} from '../../IOracle.sol'; +/** + * @title DisputeModule + * @notice Common interface for all dispute modules + */ interface IDisputeModule is IModule { /*/////////////////////////////////////////////////////////////// EVENTS diff --git a/solidity/interfaces/modules/finality/IFinalityModule.sol b/solidity/interfaces/modules/finality/IFinalityModule.sol index 96a06af..4c3e8c4 100644 --- a/solidity/interfaces/modules/finality/IFinalityModule.sol +++ b/solidity/interfaces/modules/finality/IFinalityModule.sol @@ -3,4 +3,8 @@ pragma solidity ^0.8.19; import {IModule} from '../../IModule.sol'; +/** + * @title FinalityModule + * @notice Common interface for all finality modules + */ interface IFinalityModule is IModule {} diff --git a/solidity/interfaces/modules/request/IRequestModule.sol b/solidity/interfaces/modules/request/IRequestModule.sol index bf9a870..b4ecc8f 100644 --- a/solidity/interfaces/modules/request/IRequestModule.sol +++ b/solidity/interfaces/modules/request/IRequestModule.sol @@ -3,6 +3,10 @@ pragma solidity ^0.8.19; import {IModule} from '../../IModule.sol'; +/** + * @title RequestModule + * @notice Common interface for all request modules + */ interface IRequestModule is IModule { /** * @notice Called by the oracle when a request has been made diff --git a/solidity/libraries/ValidatorLib.sol b/solidity/libraries/ValidatorLib.sol index 8c694ca..d06625d 100644 --- a/solidity/libraries/ValidatorLib.sol +++ b/solidity/libraries/ValidatorLib.sol @@ -3,6 +3,9 @@ pragma solidity ^0.8.19; import {IOracle} from '../interfaces/IOracle.sol'; +/** + * @title ValidatorLib + */ library ValidatorLib { /** * @notice Thrown when the response provided does not match the request