From fe23d2d4b5153a490a98447684e2b4ea405ba347 Mon Sep 17 00:00:00 2001 From: CJ42 Date: Fri, 29 Nov 2024 20:02:38 +0700 Subject: [PATCH] docs: Natspec fixes --- .../contracts/LSP7DigitalAsset.sol | 2 +- .../LSP7DigitalAssetInitAbstract.sol | 6 ++--- .../contracts/extensions/LSP7Votes.sol | 22 +++++++++---------- .../extensions/LSP7VotesInitAbstract.sol | 22 +++++++++---------- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/packages/lsp7-contracts/contracts/LSP7DigitalAsset.sol b/packages/lsp7-contracts/contracts/LSP7DigitalAsset.sol index 90b80a999..7397bf8c9 100644 --- a/packages/lsp7-contracts/contracts/LSP7DigitalAsset.sol +++ b/packages/lsp7-contracts/contracts/LSP7DigitalAsset.sol @@ -758,7 +758,7 @@ abstract contract LSP7DigitalAsset is } /** - * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` + * @dev Transfers `amount` of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * diff --git a/packages/lsp7-contracts/contracts/LSP7DigitalAssetInitAbstract.sol b/packages/lsp7-contracts/contracts/LSP7DigitalAssetInitAbstract.sol index 3176241bc..aa6b07982 100644 --- a/packages/lsp7-contracts/contracts/LSP7DigitalAssetInitAbstract.sol +++ b/packages/lsp7-contracts/contracts/LSP7DigitalAssetInitAbstract.sol @@ -136,7 +136,7 @@ abstract contract LSP7DigitalAssetInitAbstract is * * 2. If the data sent to this function is of length less than 4 bytes (not a function selector), revert. */ - // solhint-disable no-complex-fallback + // solhint-disable-next-line no-complex-fallback fallback( bytes calldata callData ) external payable virtual returns (bytes memory) { @@ -772,11 +772,11 @@ abstract contract LSP7DigitalAssetInitAbstract is } /** - * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` + * @dev Transfers `amount` of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * - * Emits a {Transfer} event. + * @custom:events {Transfer} event. */ function _update( address from, diff --git a/packages/lsp7-contracts/contracts/extensions/LSP7Votes.sol b/packages/lsp7-contracts/contracts/extensions/LSP7Votes.sol index b5aaab5b3..738c8a92b 100644 --- a/packages/lsp7-contracts/contracts/extensions/LSP7Votes.sol +++ b/packages/lsp7-contracts/contracts/extensions/LSP7Votes.sol @@ -106,7 +106,7 @@ abstract contract LSP7Votes is LSP7DigitalAsset, EIP712, IERC5805 { /** * @dev Retrieve the number of votes for `account` at the end of `timepoint`. * - * @custom:requirement + * @custom:requirements * - `timepoint` must be in the past */ function getPastVotes( @@ -121,7 +121,7 @@ abstract contract LSP7Votes is LSP7DigitalAsset, EIP712, IERC5805 { * @dev Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances. * It is NOT the sum of all the delegated votes! * - * @custom:requirement + * @custom:requirements * - `timepoint` must be in the past */ function getPastTotalSupply( @@ -240,9 +240,9 @@ abstract contract LSP7Votes is LSP7DigitalAsset, EIP712, IERC5805 { /** * @dev Move voting power when tokens are transferred. * - * @custom:event - * - {IVotes-DelegateVotesChanged} when voting power is removed from source address - * - {IVotes-DelegateVotesChanged} when voting power is added to destination address + * @custom:events + * - {DelegateVotesChanged} when voting power is removed from source address + * - {DelegateVotesChanged} when voting power is added to destination address */ function _update( address from, @@ -266,9 +266,9 @@ abstract contract LSP7Votes is LSP7DigitalAsset, EIP712, IERC5805 { /** * @dev Change delegation for `delegator` to `delegatee`. * - * @custom:event - * - {IVotes-DelegateChanged} - * - {IVotes-DelegateVotesChanged} + * @custom:events + * - {DelegateChanged} + * - {DelegateVotesChanged} */ function _delegate(address delegator, address delegatee) internal virtual { address currentDelegate = delegates(delegator); @@ -312,9 +312,9 @@ abstract contract LSP7Votes is LSP7DigitalAsset, EIP712, IERC5805 { /** * @dev Moves voting power from one address to another. * - * @custom:event - * - {IVotes-DelegateVotesChanged} when voting power is removed from source address - * - {IVotes-DelegateVotesChanged} when voting power is added to destination address + * @custom:events + * - {DelegateVotesChanged} when voting power is removed from source address. + * - {DelegateVotesChanged} when voting power is added to destination address */ function _moveVotingPower( address src, diff --git a/packages/lsp7-contracts/contracts/extensions/LSP7VotesInitAbstract.sol b/packages/lsp7-contracts/contracts/extensions/LSP7VotesInitAbstract.sol index 1e0f444ff..8c7090b12 100644 --- a/packages/lsp7-contracts/contracts/extensions/LSP7VotesInitAbstract.sol +++ b/packages/lsp7-contracts/contracts/extensions/LSP7VotesInitAbstract.sol @@ -133,7 +133,7 @@ abstract contract LSP7VotesInitAbstract is /** * @dev Retrieve the number of votes for `account` at the end of `timepoint`. * - * @custom:requirement + * @custom:requirements * - `timepoint` must be in the past */ function getPastVotes( @@ -148,7 +148,7 @@ abstract contract LSP7VotesInitAbstract is * @dev Retrieve the `totalSupply` at the end of `timepoint`. Note, this value is the sum of all balances. * It is NOT the sum of all the delegated votes! * - * @custom:requirement + * @custom:requirements * - `timepoint` must be in the past */ function getPastTotalSupply( @@ -267,9 +267,9 @@ abstract contract LSP7VotesInitAbstract is /** * @dev Move voting power when tokens are transferred. * - * @custom:event - * - {IVotes-DelegateVotesChanged} when voting power is removed from source address - * - {IVotes-DelegateVotesChanged} when voting power is added to destination address + * @custom:events + * - {DelegateVotesChanged} when voting power is removed from source address + * - {DelegateVotesChanged} when voting power is added to destination address */ function _update( address from, @@ -293,9 +293,9 @@ abstract contract LSP7VotesInitAbstract is /** * @dev Change delegation for `delegator` to `delegatee`. * - * @custom:event - * - {IVotes-DelegateChanged} - * - {IVotes-DelegateVotesChanged} + * @custom:events + * - {DelegateChanged} + * - {DelegateVotesChanged} */ function _delegate(address delegator, address delegatee) internal virtual { address currentDelegate = delegates(delegator); @@ -339,9 +339,9 @@ abstract contract LSP7VotesInitAbstract is /** * @dev Moves voting power from one address to another. * - * @custom:event - * - {IVotes-DelegateVotesChanged} when voting power is removed from source address - * - {IVotes-DelegateVotesChanged} when voting power is added to destination address + * @custom:events + * - {DelegateVotesChanged} when voting power is removed from source address + * - {DelegateVotesChanged} when voting power is added to destination address */ function _moveVotingPower( address src,