From dbedc71499839a04ec6c49bd81d03e2037b40b52 Mon Sep 17 00:00:00 2001 From: Jah-yee <166608075+Jah-yee@users.noreply.github.com> Date: Mon, 12 Oct 2026 04:50:42 +0800 Subject: [PATCH] fix(natspec): correct 7 typos in Solidity natspec comments Fixes #301 (bug bounty report): - wich -> which (4 occurrences across 3 files) - whitch -> which (1 occurrence in ownable.sol) - overriden -> overridden (1 occurrence in nf-token-metadata.sol) - intefraces -> interfaces (1 occurrence in supports-interface.sol) - suported -> supported (1 occurrence in supports-interface.sol) --- src/contracts/mocks/nf-token-metadata-enumerable-mock.sol | 4 ++-- src/contracts/ownership/ownable.sol | 2 +- src/contracts/tokens/nf-token-enumerable.sol | 4 ++-- src/contracts/tokens/nf-token-metadata.sol | 2 +- src/contracts/utils/supports-interface.sol | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/contracts/mocks/nf-token-metadata-enumerable-mock.sol b/src/contracts/mocks/nf-token-metadata-enumerable-mock.sol index 54003da..bdb227e 100644 --- a/src/contracts/mocks/nf-token-metadata-enumerable-mock.sol +++ b/src/contracts/mocks/nf-token-metadata-enumerable-mock.sol @@ -104,7 +104,7 @@ contract NFTokenMetadataEnumerableMock is /** * @notice Use and override this function with caution. Wrong usage can have serious consequences. * @dev Removes a NFT from an address. - * @param _from Address from wich we want to remove the NFT. + * @param _from Address from which we want to remove the NFT. * @param _tokenId Which NFT we want to remove. */ function _removeNFToken( @@ -120,7 +120,7 @@ contract NFTokenMetadataEnumerableMock is /** * @notice Use and override this function with caution. Wrong usage can have serious consequences. * @dev Assigns a new NFT to an address. - * @param _to Address to wich we want to add the NFT. + * @param _to Address to which we want to add the NFT. * @param _tokenId Which NFT we want to add. */ function _addNFToken( diff --git a/src/contracts/ownership/ownable.sol b/src/contracts/ownership/ownable.sol index 74c9aff..b83767b 100644 --- a/src/contracts/ownership/ownable.sol +++ b/src/contracts/ownership/ownable.sol @@ -2,7 +2,7 @@ pragma solidity ^0.8.0; /** - * @dev The contract has an owner address, and provides basic authorization control whitch + * @dev The contract has an owner address, and provides basic authorization control which * simplifies the implementation of user permissions. This contract is based on the source code at: * https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol */ diff --git a/src/contracts/tokens/nf-token-enumerable.sol b/src/contracts/tokens/nf-token-enumerable.sol index 25118bc..ef7aff8 100644 --- a/src/contracts/tokens/nf-token-enumerable.sol +++ b/src/contracts/tokens/nf-token-enumerable.sol @@ -148,7 +148,7 @@ contract NFTokenEnumerable is /** * @notice Use and override this function with caution. Wrong usage can have serious consequences. * @dev Removes a NFT from an address. - * @param _from Address from wich we want to remove the NFT. + * @param _from Address from which we want to remove the NFT. * @param _tokenId Which NFT we want to remove. */ function _removeNFToken( @@ -178,7 +178,7 @@ contract NFTokenEnumerable is /** * @notice Use and override this function with caution. Wrong usage can have serious consequences. * @dev Assigns a new NFT to an address. - * @param _to Address to wich we want to add the NFT. + * @param _to Address to which we want to add the NFT. * @param _tokenId Which NFT we want to add. */ function _addNFToken( diff --git a/src/contracts/tokens/nf-token-metadata.sol b/src/contracts/tokens/nf-token-metadata.sol index bd8dced..3ed7746 100644 --- a/src/contracts/tokens/nf-token-metadata.sol +++ b/src/contracts/tokens/nf-token-metadata.sol @@ -80,7 +80,7 @@ contract NFTokenMetadata is } /** - * @notice This is an internal function that can be overriden if you want to implement a different + * @notice This is an internal function that can be overridden if you want to implement a different * way to generate token URI. * @param _tokenId Id for which we want uri. * @return URI of _tokenId. diff --git a/src/contracts/utils/supports-interface.sol b/src/contracts/utils/supports-interface.sol index ced307f..8957654 100644 --- a/src/contracts/utils/supports-interface.sol +++ b/src/contracts/utils/supports-interface.sol @@ -11,7 +11,7 @@ contract SupportsInterface is { /** - * @dev Mapping of supported intefraces. You must not set element 0xffffffff to true. + * @dev Mapping of supported interfaces. You must not set element 0xffffffff to true. */ mapping(bytes4 => bool) internal supportedInterfaces; @@ -24,7 +24,7 @@ contract SupportsInterface is } /** - * @dev Function to check which interfaces are suported by this contract. + * @dev Function to check which interfaces are supported by this contract. * @param _interfaceID Id of the interface. * @return True if _interfaceID is supported, false otherwise. */