duneanalytics / duneanalytics/evm.codes
Show byte selection length in memory and bytecode text fields in playground
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 827
- Forks
- 199
- Avg merge
- 15m
- Merged PRs (30d)
- 1
Description
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
Stored:
Later on in the code I want to be able to see the offsets as such
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the playground's bytecode and memory text fields, which currently require manual offset searches. Add a visible byte-length indicator for the current text selection in both views, following the issue's suggested bottom-right placement. Done means selecting bytes in either field shows the corresponding length.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100