Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix combined_json for versions >0.3.10#29

Merged
charles-cooper merged 7 commits into
vyperlang:masterfrom
trocher:fix/combined_json_empty
Nov 19, 2024
Merged

fix combined_json for versions >0.3.10#29
charles-cooper merged 7 commits into
vyperlang:masterfrom
trocher:fix/combined_json_empty

Conversation

@trocher
Copy link
Copy Markdown
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

Comment thread vvm/main.py Outdated
apply suggestion

Co-authored-by: Charles Cooper <[email protected]>
Comment thread vvm/main.py
Copy link
Copy Markdown
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
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