You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I aliased a file, I cannot access its contracts using alias.contract notation
Code example to reproduce the issue:
# a.sol
pragma solidity0.7.6;
import"b.sol" as B;
contractAisB.C{}
# b.sol
pragma solidity0.7.6;
contractC{}
Version:
0.10.0
Relevant log output:
'solc --version' running
'solc a.sol --combined-json abi,ast,bin,bin-runtime,srcmap,srcmap-runtime,userdoc,devdoc,hashes,compact-format --allow-paths .,/home/tigran/temp/reduced' running
Compilation warnings/errors on a.sol:
Warning: SPDX license identifier not provided insource file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED"for non-open-source code. Please see https://spdx.org for more information.
--> a.sol
Warning: SPDX license identifier not provided insource file. Before publishing, consider adding a comment containing "SPDX-License-Identifier: <SPDX-License>" to each source file. Use "SPDX-License-Identifier: UNLICENSED"for non-open-source code. Please see https://spdx.org for more information.
--> b.sol
Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.7.6;"
--> b.sol
Warning: Source file does not specify required compiler version! Consider adding "pragma solidity ^0.7.6;"
--> a.sol
Traceback (most recent call last):
File "/home/tigran/Projects/integrator/query-engine/venv/bin/slither", line 8, in<module>sys.exit(main())
^^^^^^
File "/home/tigran/Projects/integrator/query-engine/venv/lib/python3.11/site-packages/slither/__main__.py", line 727, in main
main_impl(all_detector_classes=detectors, all_printer_classes=printers)
File "/home/tigran/Projects/integrator/query-engine/venv/lib/python3.11/site-packages/slither/__main__.py", line 833, in main_impl
) = process_all(filename, args, detector_classes, printer_classes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tigran/Projects/integrator/query-engine/venv/lib/python3.11/site-packages/slither/__main__.py", line 107, in process_all
) = process_single(compilation, args, detector_classes, printer_classes)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tigran/Projects/integrator/query-engine/venv/lib/python3.11/site-packages/slither/__main__.py", line 80, in process_single
slither = Slither(target, ast_format=ast, **vars(args))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tigran/Projects/integrator/query-engine/venv/lib/python3.11/site-packages/slither/slither.py", line 144, in __init__
self._init_parsing_and_analyses(kwargs.get("skip_analyze", False))
File "/home/tigran/Projects/integrator/query-engine/venv/lib/python3.11/site-packages/slither/slither.py", line 154, in _init_parsing_and_analyses
raise e
File "/home/tigran/Projects/integrator/query-engine/venv/lib/python3.11/site-packages/slither/slither.py", line 150, in _init_parsing_and_analyses
parser.parse_contracts()
File "/home/tigran/Projects/integrator/query-engine/venv/lib/python3.11/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 449, in parse_contracts
assert target, f"Contract {contract_name} not found"
AssertionError: Contract B.C not found
The text was updated successfully, but these errors were encountered:
Describe the issue:
When I aliased a file, I cannot access its contracts using
alias.contract
notationCode example to reproduce the issue:
Version:
0.10.0
Relevant log output:
The text was updated successfully, but these errors were encountered: