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

fix combined_json for versions >0.3.10 #29

Merged
merged 7 commits into from
Nov 19, 2024

Conversation

trocher
Copy link
Contributor

@trocher trocher commented Nov 18, 2024

What I did

Fixed the combined_json output for versions 0.4.x
Fixes #28

How I did it

pop from the dict version as it would be before the contract's data.

How to verify it

import vvm
print(vvm.compile_source("# pragma version 0.4.0", vyper_version="0.4.0"))

would return before:

{'<stdin>': '0.4.0'}

and now:

{'<stdin>': {'bytecode': '0x61000361000f6000396100036000f35f5ffd84038000a1657679706572830004000011', 'bytecode_runtime': '0x5f5ffd', 'blueprint_bytecode': '0x6100263d81600a3d39f3fe710061000361000f6000396100036000f35f5ffd84038000a1657679706572830004000011', 'abi': [], 'layout': {}, 'source_map': {'breakpoints': [], 'error_map': {'17': 'fallback function'}, 'pc_breakpoints': [], 'pc_jump_map': {'0': '-', '15': '-'}, 'pc_pos_map_compressed': '0:22:0:-;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1;-1:-1:-1:-;-1:-1:-1;-1:-1:-1', 'pc_pos_map': {'0': [1, 0, 1, 22]}, 'pc_ast_map': {'0': [0, 0]}, 'pc_ast_map_item_keys': ['source_id', 'node_id']}, 'source_map_runtime': {'breakpoints': [], 'error_map': {'2': 'fallback function'}, 'pc_breakpoints': [], 'pc_jump_map': {'0': '-'}, 'pc_pos_map_compressed': '0:22:0:-;-1:-1:-1;-1:-1:-1', 'pc_pos_map': {'0': [1, 0, 1, 22]}, 'pc_ast_map': {'0': [0, 0]}, 'pc_ast_map_item_keys': ['source_id', 'node_id']}, 'method_identifiers': {}, 'userdoc': {}, 'devdoc': {}}}

Checklist

  • I have confirmed that my PR passes all linting checks
  • I have included test cases
  • I have updated the documentation (README.md)
  • I have added an entry to the changelog

vvm/main.py Outdated Show resolved Hide resolved
apply suggestion

Co-authored-by: Charles Cooper <[email protected]>
Copy link
Member

@charles-cooper charles-cooper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@charles-cooper charles-cooper merged commit e5eb199 into vyperlang:master Nov 19, 2024
9 of 10 checks passed
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.

Incompatibility with different vyper versions
3 participants