-
Notifications
You must be signed in to change notification settings - Fork 982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: feature to read contract storage data #968
Conversation
This pull request introduces 1 alert when merging 6188045 into 3bc22a9 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging bfc27fd into 3bc22a9 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging ff4c625 into 1548c82 - view on LGTM.com new alerts:
|
ff4c625
to
4d683c2
Compare
This pull request introduces 1 alert when merging 4d683c2 into 1548c82 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 1ca2a2c into 5de54f7 - view on LGTM.com new alerts:
|
1ca2a2c
to
23ab9ce
Compare
This pull request introduces 1 alert when merging 23ab9ce into 5de54f7 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 665c3fe into 5de54f7 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging a8c1d13 into 5de54f7 - view on LGTM.com new alerts:
|
This pull request introduces 2 alerts when merging a578882 into a4d7f98 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 76a9712 into a4d7f98 - view on LGTM.com new alerts:
|
76a9712
to
5ddc6e8
Compare
This pull request introduces 1 alert when merging 5ddc6e8 into a4d7f98 - view on LGTM.com new alerts:
|
5ddc6e8
to
279d0de
Compare
This pull request introduces 1 alert when merging 279d0de into a4d7f98 - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging e22b102 into a4d7f98 - view on LGTM.com new alerts:
|
e22b102
to
25576c2
Compare
This pull request introduces 3 alerts when merging 25576c2 into a4d7f98 - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging 4a2f8ba into 1771e48 - view on LGTM.com new alerts:
|
This pull request introduces 3 alerts when merging 3c96660 into 1771e48 - view on LGTM.com new alerts:
|
…p mappings, arrays
3c96660
to
0b62138
Compare
This pull request introduces 3 alerts when merging 0b62138 into 0342506 - view on LGTM.com new alerts:
|
c1684f6
to
17e942b
Compare
17e942b
to
05f33ba
Compare
from slither.tools.read_storage.read_storage import get_storage_layout, get_storage_slot_and_val | ||
|
||
|
||
def parse_args(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add return type
return parser.parse_args() | ||
|
||
|
||
def main(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add return type
|
||
|
||
# pylint: disable=too-many-arguments | ||
def _all_struct_variables(var, contracts, address, rpc_url, storage_address=None, key=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add parameters and return types
|
||
|
||
# pylint: disable=too-many-branches,too-many-locals,too-many-nested-blocks | ||
def get_storage_layout( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add return type
return data | ||
|
||
|
||
# pylint: disable=too-many-branches,too-many-locals,too-many-nested-blocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can split this function into sub-functions to not remove all these warnings
json.dump(data, f, indent=4) | ||
|
||
|
||
# pylint: disable=too-many-statements,too-many-branches,inconsistent-return-statements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, I think we can split this function into sub-functions to not remove all these warnings
|
||
return int_slot, value, type_to | ||
|
||
if not found: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like we can remove found
and raise a exception if we reached this part of the code, is that correct?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would also avoid having an undefined return
This pull request introduces 1 alert when merging 931a151 into 61bcec4 - view on LGTM.com new alerts:
|
4165055
to
3d6ef9d
Compare
3d6ef9d
to
4f888ef
Compare
4f888ef
to
150f7e7
Compare
Closes #793 and #932
ContractStructure
types