11// SPDX-License-Identifier: MIT
22
3- /**
4- * @authors: [@mtsalenc*, @unknownunknown1]
5- * @reviewers: []
6- * @auditors: []
7- * @bounties: []
8- * @deployments: []
9- */
3+ /// @custom:authors: [@mtsalenc*, @unknownunknown1]
4+ /// @custom:reviewers: []
5+ /// @custom:auditors: []
6+ /// @custom:bounties: []
7+ /// @custom:deployments: []
108
119pragma solidity 0.8.18 ;
1210
1311import {Curate, IArbitratorV2} from "./CurateV2.sol " ;
1412
15- /**
16- * @title CurateFactory
17- * This contract acts as a registry for Curate instances.
18- */
13+ /// @title CurateFactory
14+ /// This contract acts as a registry for Curate instances.
1915contract CurateFactory {
20- /**
21- * @dev Emitted when a new Curate contract is deployed using this factory. TODO: change TCR mentions.
22- * @param _address The address of the newly deployed Curate contract.
23- */
16+ // ************************************* //
17+ // * Events * //
18+ // ************************************* //
19+
20+ /// @dev Emitted when a new Curate contract is deployed using this factory. TODO: change TCR mentions.
21+ /// @param _address The address of the newly deployed Curate contract.
2422 event NewGTCR (Curate indexed _address );
2523
24+ // ************************************* //
25+ // * Storage * //
26+ // ************************************* //
27+
2628 Curate[] public instances;
2729 address public curate;
2830
29- /**
30- * @dev Constructor.
31- * @param _curate Address of the Curate contract that is going to be used for each new deployment.
32- */
31+ // ************************************* //
32+ // * Constructor * //
33+ // ************************************* //
34+
35+ /// @dev Constructor.
36+ /// @param _curate Address of the Curate contract that is going to be used for each new deployment.
3337 constructor (address _curate ) {
3438 curate = _curate;
3539 }
3640
37- /**
38- * @dev Deploy the arbitrable curated registry.
39- * @param _arbitrator Arbitrator to resolve potential disputes. The arbitrator is trusted to support appeal periods and not reenter.
40- * @param _arbitratorExtraData Extra data for the trusted arbitrator contract.
41- * @param _connectedTCR The address of the Curate contract that stores related Curate addresses. This parameter can be left empty.
42- * @param _registrationTemplateParameters Template and data mappings json for registration requests.
43- * @param _removalTemplateParameters Template and data mappings json for removal requests.
44- * @param _governor The trusted governor of this contract.
45- * @param _baseDeposits The base deposits for requests/challenges as follows:
46- * - The base deposit to submit an item.
47- * - The base deposit to remove an item.
48- * - The base deposit to challenge a submission.
49- * - The base deposit to challenge a removal request.
50- * @param _challengePeriodDuration The time in seconds parties have to challenge a request.
51- * @param _relayerContract The address of the relay contract to add/remove items directly.
52- * @param _templateRegistry The dispute template registry.
53- */
41+ // ************************************* //
42+ // * State Modifiers * //
43+ // ************************************* //
44+
45+ /// @dev Deploy the arbitrable curated registry.
46+ /// @param _arbitrator Arbitrator to resolve potential disputes. The arbitrator is trusted to support appeal periods and not reenter.
47+ /// @param _arbitratorExtraData Extra data for the trusted arbitrator contract.
48+ /// @param _connectedTCR The address of the Curate contract that stores related Curate addresses. This parameter can be left empty.
49+ /// @param _registrationTemplateParameters Template and data mappings json for registration requests.
50+ /// @param _removalTemplateParameters Template and data mappings json for removal requests.
51+ /// @param _governor The trusted governor of this contract.
52+ /// @param _baseDeposits The base deposits for requests/challenges as follows:
53+ /// - The base deposit to submit an item.
54+ /// - The base deposit to remove an item.
55+ /// - The base deposit to challenge a submission.
56+ /// - The base deposit to challenge a removal request.
57+ /// @param _challengePeriodDuration The time in seconds parties have to challenge a request.
58+ /// @param _relayerContract The address of the relay contract to add/remove items directly.
59+ /// @param _templateRegistry The dispute template registry.
5460 function deploy (
5561 IArbitratorV2 _arbitrator ,
5662 bytes calldata _arbitratorExtraData ,
@@ -80,12 +86,10 @@ contract CurateFactory {
8086 emit NewGTCR (instance);
8187 }
8288
83- /**
84- * @notice Adaptation of https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/Clones.sol.
85- * @dev Deploys and returns the address of a clone that mimics the behaviour of `curate`.
86- * @param _implementation Address of the contract to clone.
87- * This function uses the create opcode, which should never revert.
88- */
89+ /// @notice Adaptation of https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/proxy/Clones.sol.
90+ /// @dev Deploys and returns the address of a clone that mimics the behaviour of `curate`.
91+ /// @param _implementation Address of the contract to clone.
92+ /// This function uses the create opcode, which should never revert.
8993 function clone (address _implementation ) internal returns (Curate instance ) {
9094 /// @solidity memory-safe-assembly
9195 assembly {
@@ -99,10 +103,12 @@ contract CurateFactory {
99103 require (instance != Curate (address (0 )), "ERC1167: create failed " );
100104 }
101105
102- /**
103- * @return The number of deployed Curate contracts using this factory.
104- */
106+ // ************************************* //
107+ // * Public Views * //
108+ // ************************************* //
109+
110+ /// @return The number of deployed Curate contracts using this factory.
105111 function count () external view returns (uint256 ) {
106112 return instances.length ;
107113 }
108- }
114+ }
0 commit comments