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
The slither-flattener can flatten a library/contract that contain structs with single arrays as their elements but can't flatten contracts that contain structs with double arrays as elements.
Traceback (most recent call last):
File "/opt/homebrew/bin/slither-flat", line 8, in<module>sys.exit(main())
File "/opt/homebrew/lib/python3.10/site-packages/slither/tools/flattening/__main__.py", line 112, in main
slither = Slither(args.filename, **vars(args))
File "/opt/homebrew/lib/python3.10/site-packages/slither/slither.py", line 125, in __init__
parser.parse_contracts()
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 489, in parse_contracts
self._analyze_second_part(contracts_to_be_analyzed, libraries)
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 557, in _analyze_second_part
self._analyze_top_level_structures()
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/slither_compilation_unit_solc.py", line 635, in _analyze_top_level_structures
struct.analyze()
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/declarations/structure_top_level.py", line 57, in analyze
elem_parser.analyze(self)
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/variables/variable_declaration.py", line 210, in analyze
self._variable.type = parse_type(self._elem_to_parse, caller_context)
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/solidity_types/type_parsing.py", line 419, in parse_type
array_type = parse_type(t["baseType"], next_context)
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/solidity_types/type_parsing.py", line 418, in parse_type
length = parse_expression(t["length"], caller_context)
File "/opt/homebrew/lib/python3.10/site-packages/slither/solc_parsing/expressions/expression_parsing.py", line 258, in parse_expression
assert isinstance(caller_context, CallerContextExpression)
AssertionError
The text was updated successfully, but these errors were encountered:
asmitadhungana
changed the title
[Bug-Candidate]: slither-flat can't flatten contracts containing structs with double-arrays
[Bug-Candidate]: slither-flat can't flatten contracts containing structs with nested-arrays
Mar 1, 2023
0xalpharush
changed the title
[Bug-Candidate]: slither-flat can't flatten contracts containing structs with nested-arrays
[Bug]: slither-flat can't flatten contracts containing structs with nested-arrays
Mar 6, 2023
Hi, what's the status on this bug-fix process?
Also, would this bug prevent echidna from testing a similar contract containing multidimensional arrays?
For my testing process, even on similar contracts flattened using other flattening tools, running echidna-test won't get past the static-analysis part, due to Slither issues.
Describe the issue:
The slither-flattener can flatten a library/contract that contain structs with single arrays as their elements but can't flatten contracts that contain structs with double arrays as elements.
Code example to reproduce the issue:
Command:
Version:
0.9.1
Relevant log output:
The text was updated successfully, but these errors were encountered: