Skip to content

Commit

Permalink
helper
Browse files Browse the repository at this point in the history
  • Loading branch information
samczsun committed Jun 15, 2020
1 parent df2af33 commit 1cb906d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions slither/core/declarations/solidity_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,13 @@ def __init__(self, name):
def _check_name(self, name):
assert name in SOLIDITY_VARIABLES or name.endswith("_slot") or name.endswith("_offset")

@property
def state_variable(self):
if self._name.endswith("_slot"):
return self._name[:-5]
if self._name.endswith("_offset"):
return self._name[:-7]

@property
def name(self):
return self._name
Expand Down

0 comments on commit 1cb906d

Please sign in to comment.