diff --git a/slither/core/declarations/contract.py b/slither/core/declarations/contract.py index f06bc3031..cbfe723f7 100644 --- a/slither/core/declarations/contract.py +++ b/slither/core/declarations/contract.py @@ -647,8 +647,7 @@ class Contract(ChildSlither, SourceMapping): """ # We do not check for all the functions, as name(), symbol(), might give too many FPs full_names = self.functions_signatures - return ('approve(address,uint256)' in full_names or - 'ownerOf(uint256)' in full_names or + return ('ownerOf(uint256)' in full_names or 'safeTransferFrom(address,address,uint256,bytes)' in full_names or 'safeTransferFrom(address,address,uint256)' in full_names or 'setApprovalForAll(address,bool)' in full_names or diff --git a/slither/utils/erc.py b/slither/utils/erc.py index 08aa7ad0d..21c2c53a5 100644 --- a/slither/utils/erc.py +++ b/slither/utils/erc.py @@ -5,10 +5,8 @@ def erc_to_signatures(erc): # Final # https://eips.ethereum.org/EIPS/eip-20 -ERC20 = [('name', [], 'string'), - ('symbol', [], 'string'), - ('decimals', [], 'uint8'), - ('totalSupply', [], 'uint256'), +# name, symbolc, decimals are optionals +ERC20 = [('totalSupply', [], 'uint256'), ('balanceOf', ['address'], 'uint256'), ('transfer', ['address', 'uint256'], 'bool'), ('transferFrom', ['address', 'address', 'uint256'], 'bool'),