Skip to content

Commit 4a8cdf7

Browse files
authored
Merge pull request #833 from crytic/dev-yul-slot-offset
Add support for .slot and .offset in yul parsing
2 parents 4780ff5 + 553c498 commit 4a8cdf7

File tree

152 files changed

+156
-9
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

152 files changed

+156
-9
lines changed

slither/solc_parsing/yul/parse_yul.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -694,15 +694,15 @@ def parse_yul_identifier(root: YulScope, _node: YulNode, ast: Dict) -> Optional[
694694
return Identifier(func.underlying)
695695

696696
# check for magic suffixes
697-
if name.endswith("_slot"):
697+
if name.endswith("_slot") or name.endswith(".slot"):
698698
potential_name = name[:-5]
699699
var = root.function.contract.get_state_variable_from_name(potential_name)
700700
if var:
701701
return Identifier(var)
702702
var = root.function.get_local_variable_from_name(potential_name)
703703
if var and var.is_storage:
704704
return Identifier(var)
705-
if name.endswith("_offset"):
705+
if name.endswith("_offset") or name.endswith(".offset"):
706706
potential_name = name[:-7]
707707
var = root.function.contract.get_state_variable_from_name(potential_name)
708708
if var:
-1 Bytes
Binary file not shown.
-7 Bytes
Binary file not shown.
-5 Bytes
Binary file not shown.
23 Bytes
Binary file not shown.
18 Bytes
Binary file not shown.
19 Bytes
Binary file not shown.
15 Bytes
Binary file not shown.
18 Bytes
Binary file not shown.
14 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)