slither.core.declarations.enum_contract
1from typing import TYPE_CHECKING 2 3from slither.core.declarations.contract_level import ContractLevel 4from slither.core.declarations import Enum 5 6if TYPE_CHECKING: 7 from slither.core.declarations import Contract 8 9 10class EnumContract(Enum, ContractLevel): 11 def is_declared_by(self, contract: "Contract") -> bool: 12 """ 13 Check if the element is declared by the contract 14 :param contract: 15 :return: 16 """ 17 return self.contract == contract
class
EnumContract(slither.core.declarations.enum.Enum, slither.core.declarations.contract_level.ContractLevel):
11class EnumContract(Enum, ContractLevel): 12 def is_declared_by(self, contract: "Contract") -> bool: 13 """ 14 Check if the element is declared by the contract 15 :param contract: 16 :return: 17 """ 18 return self.contract == contract
This class is used to represent objects that are at the contract level The opposite is TopLevel
12 def is_declared_by(self, contract: "Contract") -> bool: 13 """ 14 Check if the element is declared by the contract 15 :param contract: 16 :return: 17 """ 18 return self.contract == contract
Check if the element is declared by the contract
Parameters
- contract: