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

Show byte selection length in memory and bytecode text fields in playground #361

Open
kuzdogan opened this issue Dec 17, 2024 · 0 comments

Comments

@kuzdogan
Copy link

I was going through a Vyper bytecode in the playground and I found myself searching for bytecode offsets multiple times in the raw bytecode and in the memory. I had to take the pushed values in hex, convert to decimal, multiply with 2, and use a text editor the find the exact offset for that hex value.

Ideally I should be able to see the byte lengths on selecting with the cursor in bytecode or memory views to see easier.

Example

An example with this bytecode

60e7515034610035573360a75260206100f560003960005160c75266eca7a2f8618d6f60e7526100a761003a6000396101076000f35b600080fd60003560e01c60026005820660011b61009d01601e39600051565b635f284cb3811861009257346100985760206100c760403960206040f35b63117803e3811861009257346100985760206100a760403960206040f35b633bc72e5e811861009257346100985760206100c760403960206040f35b635acb1ac8811861009257346100985760206100e760403960206040f35b60006000fd5b600080fd001a00920038005600748418a7810a1860a16576797065728300040000140000000000000000000000000000000000000000000000000000000000000005

The CALLER value gets stored to a7 in the memory
image
Stored:
image

Later on in the code I want to be able to see the offsets as such
image

If you think this makes sense, I can implement and open a PR for this, it should be straightforward. We can think about where to show this and the design colors etc. I'd put them bottom right of the memory and bytecode view text blocks, as in the example.

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

No branches or pull requests

1 participant