Merge pull request #1308 from crytic/dev-contract-kind

Fix contract_kind
pull/1309/head
Feist Josselin 2 years ago committed by GitHub
commit 90d13cd388
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      slither/solc_parsing/declarations/contract.py
  2. 2
      slither/tools/flattening/flattening.py

@ -157,7 +157,7 @@ class ContractSolc(CallerContextExpression):
if "contractKind" in attributes:
if attributes["contractKind"] == "interface":
self._contract.is_interface = True
self._contract.kind = attributes["contractKind"]
self._contract.contract_kind = attributes["contractKind"]
self._linearized_base_contracts = attributes["linearizedBaseContracts"]
# self._contract.fullyImplemented = attributes["fullyImplemented"]

@ -111,7 +111,7 @@ class Flattening:
to_patch = []
# interface must use external
if self._external_to_public and contract.contract_kind != "interface":
if self._external_to_public and not contract.is_interface:
for f in contract.functions_declared:
# fallback must be external
if f.is_fallback or f.is_constructor_variables:

Loading…
Cancel
Save