diff --git a/contracts/core/Allo.sol b/contracts/core/Allo.sol index d5f16cd9..5219c65c 100644 --- a/contracts/core/Allo.sol +++ b/contracts/core/Allo.sol @@ -694,6 +694,7 @@ contract Allo is IAllo, Native, Initializable, Ownable, AccessControlUpgradeable } /// @dev Logic copied from ERC2771ContextUpgradeable OZ contracts + /// @return the sender of the call function _msgSender() internal view virtual override returns (address) { uint256 calldataLength = msg.data.length; if (isTrustedForwarder(msg.sender) && calldataLength >= 20) { @@ -704,6 +705,7 @@ contract Allo is IAllo, Native, Initializable, Ownable, AccessControlUpgradeable } /// @dev Logic copied from ERC2771ContextUpgradeable OZ contracts + /// @return calldata filterring the sender address when the trusted forward is the operator function _msgData() internal view override returns (bytes calldata) { uint256 calldataLength = msg.data.length; if (isTrustedForwarder(msg.sender) && calldataLength >= 20) { diff --git a/contracts/core/libraries/Clone.sol b/contracts/core/libraries/Clone.sol index adea2819..b143a1d7 100644 --- a/contracts/core/libraries/Clone.sol +++ b/contracts/core/libraries/Clone.sol @@ -24,9 +24,10 @@ import {ClonesUpgradeable} from "openzeppelin-contracts-upgradeable/contracts/pr /// @notice A helper library to create deterministic clones of the strategy contracts when a pool is created /// @dev Handles the creation of clones for the strategy contracts and returns the address of the clone library Clone { - /// @dev Create a clone of the contract + /// @notice Create a clone of the contract /// @param _contract The address of the contract to clone /// @param _nonce The nonce to use for the clone + /// @return address of the new contract function createClone(address _contract, uint256 _nonce) internal returns (address) { bytes32 salt = keccak256(abi.encodePacked(msg.sender, _nonce)); diff --git a/contracts/factories/ContractFactory.sol b/contracts/factories/ContractFactory.sol index e823db36..f6106b7b 100644 --- a/contracts/factories/ContractFactory.sol +++ b/contracts/factories/ContractFactory.sol @@ -38,6 +38,8 @@ contract ContractFactory { /// ====================== /// @notice Emitted when a contract is deployed. + /// @param deployed address + /// @param salt used in contract creation event Deployed(address indexed deployed, bytes32 indexed salt); /// ====================== diff --git a/contracts/factories/DGLFactory.sol b/contracts/factories/DGLFactory.sol index 4a33aa40..0c00690b 100644 --- a/contracts/factories/DGLFactory.sol +++ b/contracts/factories/DGLFactory.sol @@ -72,6 +72,7 @@ contract DGLFactory is Ownable { } /// @notice Creates a new DirectGrantsLiteStrategy + /// @return strategy The address of the new strategy function createStrategy() external returns (address strategy) { strategy = address(new DirectGrantsLiteStrategy(allo, name)); emit StrategyCreated(strategy); @@ -80,6 +81,7 @@ contract DGLFactory is Ownable { /// @notice Creates a new DirectGrantsLiteStrategy with custom params /// @param _allo The 'Allo' contract /// @param _name The name of the strategy + /// @return strategy The address of the new strategy function createCustomStrategy(address _allo, string memory _name) external returns (address strategy) { strategy = address(new DirectGrantsLiteStrategy(_allo, _name)); emit StrategyCreated(strategy); diff --git a/contracts/factories/DVMDTFactory.sol b/contracts/factories/DVMDTFactory.sol index 57ffcccd..31908aa1 100644 --- a/contracts/factories/DVMDTFactory.sol +++ b/contracts/factories/DVMDTFactory.sol @@ -88,6 +88,7 @@ contract DVMDTFactory is Ownable { } /// @notice Creates a new DonationVotingMerkleDistributionDirectTransferStrategy + /// @return strategy The address of the new strategy function createStrategy() external returns (address strategy) { strategy = address(new DonationVotingMerkleDistributionDirectTransferStrategy(allo, name, permit2)); emit StrategyCreated(strategy); @@ -97,6 +98,7 @@ contract DVMDTFactory is Ownable { /// @param _allo The 'Allo' contract /// @param _name The name of the strategy /// @param _permit2 The permit2 contract + /// @return strategy The address of the new strategy function createStrategyCustom(address _allo, string memory _name, ISignatureTransfer _permit2) external returns (address strategy) diff --git a/contracts/strategies/examples/easy-rpgf/EasyRPGF.sol b/contracts/strategies/examples/easy-rpgf/EasyRPGF.sol index ca863957..855f895d 100644 --- a/contracts/strategies/examples/easy-rpgf/EasyRPGF.sol +++ b/contracts/strategies/examples/easy-rpgf/EasyRPGF.sol @@ -22,6 +22,7 @@ import {Transfer} from "contracts/core/libraries/Transfer.sol"; // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣧⠀⠀⢸⣿⣿⣿⣗⠀⠀⠀⢸⣿⣿⣿⡯⠀⠀⠀⠀⠹⢿⣿⣿⣿⣿⣾⣾⣷⣿⣿⣿⣿⡿⠋⠀⠀⠀⠀ // ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠙⠋⠛⠙⠋⠛⠙⠋⠛⠙⠋⠃⠀⠀⠀⠀⠀⠀⠀⠀⠠⠿⠻⠟⠿⠃⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠸⠟⠿⠟⠿⠆⠀⠸⠿⠿⠟⠯⠀⠀⠀⠸⠿⠿⠿⠏⠀⠀⠀⠀⠀⠈⠉⠻⠻⡿⣿⢿⡿⡿⠿⠛⠁⠀⠀⠀⠀⠀⠀ // allo.gitcoin.co + contract EasyRPGF is BaseStrategy { using Transfer for address; @@ -46,7 +47,8 @@ contract EasyRPGF is BaseStrategy { /// @notice Initialize the strategy /// @param _poolId The pool id - function initialize(uint256 _poolId, bytes memory) external override { + /// @param _data Not used + function initialize(uint256 _poolId, bytes memory _data) external override { __BaseStrategy_init(_poolId); emit Initialized(_poolId, ""); diff --git a/contracts/strategies/examples/impact-stream/QVImpactStream.sol b/contracts/strategies/examples/impact-stream/QVImpactStream.sol index e7cb736b..985b74f3 100644 --- a/contracts/strategies/examples/impact-stream/QVImpactStream.sol +++ b/contracts/strategies/examples/impact-stream/QVImpactStream.sol @@ -135,7 +135,7 @@ contract QVImpactStream is QVSimple { /// ==== Internal Functions ===== /// ============================= - /// @inheritdoc BaseStrategy + /// @inheritdoc QVSimple function _distribute(address[] memory _recipientIds, bytes memory, address _sender) internal virtual diff --git a/contracts/strategies/extensions/register/IRecipientsExtension.sol b/contracts/strategies/extensions/register/IRecipientsExtension.sol index be78cc6e..8cae5335 100644 --- a/contracts/strategies/extensions/register/IRecipientsExtension.sol +++ b/contracts/strategies/extensions/register/IRecipientsExtension.sol @@ -29,7 +29,8 @@ interface IRecipientsExtension { /// | recipient1 | recipient2 | recipient3 | recipient4 | recipient5 | 'rowIndex' /// | 0000 | 0001 | 0010 | 0011 | 0100 | 'statusRow' /// | none | pending | accepted | rejected | appealed | converted status (0, 1, 2, 3, 4) - /// + /// @param index along a word + /// @param statusRow is the word index struct ApplicationStatus { uint256 index; uint256 statusRow; diff --git a/contracts/strategies/libraries/QFHelper.sol b/contracts/strategies/libraries/QFHelper.sol index 819c1f56..6ba52d6e 100644 --- a/contracts/strategies/libraries/QFHelper.sol +++ b/contracts/strategies/libraries/QFHelper.sol @@ -11,7 +11,7 @@ library QFHelper { /// @notice Error thrown when the number of recipients and amounts are not equal error QFHelper_LengthMissmatch(); - /// Struct that defines the state of the donations to recipients + /// @notice Struct that defines the state of the donations to recipients /// @param sqrtDonationsSum The sum of the square root of the donations for each recipient /// @param totalContributions The total contributions of all recipients struct State { diff --git a/natspec-smells.config.js b/natspec-smells.config.js index 292a14f3..e8a9b213 100644 --- a/natspec-smells.config.js +++ b/natspec-smells.config.js @@ -9,8 +9,8 @@ module.exports = { ], exclude: [ 'contracts/strategies/deprecated/**/*.sol', - 'contracts/factories/**/*.sol', 'contracts/migration/**/*.sol', + 'contracts/core/interfaces/IDAI.sol', ], enforceInheritdoc: false, }; \ No newline at end of file