Remove optional ERC20 functions

pull/228/head
Josselin 6 years ago
parent 0beb48146a
commit e6c9d186e3
  1. 3
      slither/core/declarations/contract.py
  2. 6
      slither/utils/erc.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

@ -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'),

Loading…
Cancel
Save