Skip to content
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

add metadata parsing + removal from bytecode #304

Merged
merged 13 commits into from
Dec 22, 2022
Merged

Conversation

rmi7
Copy link
Contributor

@rmi7 rmi7 commented Oct 28, 2022

fixes #59

you can test it using this:

from crytic_compile import CryticCompile

def test_remove_metadata():
    crytic_compile_instance = CryticCompile(
        "0x6B175474E89094C44Da98b954EedeAC495271d0F", # solc 0.5.12
        compile_remove_metadata = True
    )

def test_get_metadata_of():
    crytic_compile_instance = CryticCompile(
        "0x6B175474E89094C44Da98b954EedeAC495271d0F", # solc 0.5.12
    )
    cu = list(crytic_compile_instance.compilation_units.values())[0]
    print(cu.metadata_of('Dai'))

test_remove_metadata()
test_get_metadata_of()

@rmi7 rmi7 requested a review from montyly October 28, 2022 16:07
@rmi7 rmi7 force-pushed the fix-metadata-issue branch from aa11ea6 to c1b1f59 Compare October 28, 2022 16:14
@crytic crytic deleted a comment from CLAassistant Oct 28, 2022
@lgtm-com
Copy link

lgtm-com bot commented Oct 28, 2022

This pull request introduces 1 alert when merging c1b1f59 into 1ca05b8 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'

@lgtm-com
Copy link

lgtm-com bot commented Oct 31, 2022

This pull request introduces 1 alert when merging f5ac0c6 into 1ca05b8 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'

@lgtm-com
Copy link

lgtm-com bot commented Nov 2, 2022

This pull request introduces 1 alert when merging 905cedd into 1ca05b8 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'

@lgtm-com
Copy link

lgtm-com bot commented Nov 4, 2022

This pull request introduces 1 alert when merging d59e0b0 into 1ca05b8 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'

@montyly
Copy link
Member

montyly commented Dec 6, 2022

This is great. Can we add the testcase in the CI?

@lgtm-com
Copy link

lgtm-com bot commented Dec 6, 2022

This pull request introduces 1 alert when merging f1d1c3e into a2c7147 - view on LGTM.com

new alerts:

  • 1 for Except block handles 'BaseException'

Heads-up: LGTM.com's PR analysis will be disabled on the 5th of December, and LGTM.com will be shut down ⏻ completely on the 16th of December 2022. Please enable GitHub code scanning, which uses the same CodeQL engine ⚙️ that powers LGTM.com. For more information, please check out our post on the GitHub blog.

@rmi7
Copy link
Contributor Author

rmi7 commented Dec 6, 2022

This is great. Can we add the testcase in the CI?

good point' I'll look into it

@rmi7 rmi7 force-pushed the fix-metadata-issue branch from be29505 to ff92c5a Compare December 21, 2022 11:06
@montyly montyly merged commit 99c0288 into dev Dec 22, 2022
@montyly montyly deleted the fix-metadata-issue branch February 17, 2023 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants