From 73fbcea3eee7b3e543d9c8382415bfa864373264 Mon Sep 17 00:00:00 2001 From: Guilherme Dantas Date: Wed, 7 Aug 2024 12:02:27 -0300 Subject: [PATCH] docs: add documentation about constructor parameters --- contracts/consensus/authority/IAuthorityFactory.sol | 2 ++ contracts/consensus/quorum/IQuorumFactory.sol | 2 ++ contracts/dapp/Application.sol | 1 + contracts/dapp/IApplicationFactory.sol | 2 ++ contracts/dapp/ISelfHostedApplicationFactory.sol | 2 ++ 5 files changed, 9 insertions(+) diff --git a/contracts/consensus/authority/IAuthorityFactory.sol b/contracts/consensus/authority/IAuthorityFactory.sol index 32cdb4e6..7cf3d719 100644 --- a/contracts/consensus/authority/IAuthorityFactory.sol +++ b/contracts/consensus/authority/IAuthorityFactory.sol @@ -20,6 +20,7 @@ interface IAuthorityFactory { /// @param authorityOwner The initial authority owner /// @return The authority /// @dev On success, MUST emit an `AuthorityCreated` event. + /// @dev Reverts if the authority owner address is zero. function newAuthority(address authorityOwner) external returns (Authority); /// @notice Deploy a new authority deterministically. @@ -27,6 +28,7 @@ interface IAuthorityFactory { /// @param salt The salt used to deterministically generate the authority address /// @return The authority /// @dev On success, MUST emit an `AuthorityCreated` event. + /// @dev Reverts if the authority owner address is zero. function newAuthority( address authorityOwner, bytes32 salt diff --git a/contracts/consensus/quorum/IQuorumFactory.sol b/contracts/consensus/quorum/IQuorumFactory.sol index aee21d2a..c1f4ce47 100644 --- a/contracts/consensus/quorum/IQuorumFactory.sol +++ b/contracts/consensus/quorum/IQuorumFactory.sol @@ -20,6 +20,7 @@ interface IQuorumFactory { /// @param validators the list of validators /// @return The quorum /// @dev On success, MUST emit a `QuorumCreated` event. + /// @dev Duplicates in the `validators` array are ignored. function newQuorum(address[] calldata validators) external returns (Quorum); /// @notice Deploy a new quorum deterministically. @@ -27,6 +28,7 @@ interface IQuorumFactory { /// @param salt The salt used to deterministically generate the quorum address /// @return The quorum /// @dev On success, MUST emit a `QuorumCreated` event. + /// @dev Duplicates in the `validators` array are ignored. function newQuorum( address[] calldata validators, bytes32 salt diff --git a/contracts/dapp/Application.sol b/contracts/dapp/Application.sol index f7cb1956..8c171fa9 100644 --- a/contracts/dapp/Application.sol +++ b/contracts/dapp/Application.sol @@ -44,6 +44,7 @@ contract Application is /// @param consensus The initial consensus contract /// @param initialOwner The initial application owner /// @param templateHash The initial machine state hash + /// @dev Reverts if the initial application owner address is zero. constructor( IConsensus consensus, address initialOwner, diff --git a/contracts/dapp/IApplicationFactory.sol b/contracts/dapp/IApplicationFactory.sol index 637bb172..d4cc5c16 100644 --- a/contracts/dapp/IApplicationFactory.sol +++ b/contracts/dapp/IApplicationFactory.sol @@ -31,6 +31,7 @@ interface IApplicationFactory { /// @param templateHash The initial machine state hash /// @return The application /// @dev On success, MUST emit an `ApplicationCreated` event. + /// @dev Reverts if the application owner address is zero. function newApplication( IConsensus consensus, address appOwner, @@ -44,6 +45,7 @@ interface IApplicationFactory { /// @param salt The salt used to deterministically generate the application contract address /// @return The application /// @dev On success, MUST emit an `ApplicationCreated` event. + /// @dev Reverts if the application owner address is zero. function newApplication( IConsensus consensus, address appOwner, diff --git a/contracts/dapp/ISelfHostedApplicationFactory.sol b/contracts/dapp/ISelfHostedApplicationFactory.sol index 02f1486e..cda7a055 100644 --- a/contracts/dapp/ISelfHostedApplicationFactory.sol +++ b/contracts/dapp/ISelfHostedApplicationFactory.sol @@ -28,6 +28,8 @@ interface ISelfHostedApplicationFactory { /// @param salt The salt used to deterministically generate the addresses /// @return The application contract /// @return The authority contract + /// @dev Reverts if the authority owner address is zero. + /// @dev Reverts if the application owner address is zero. function deployContracts( address authorityOwner, address appOwner,