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

Aperta
#361 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

Inizia dai campi di testo del bytecode e della memoria del playground, che attualmente richiedono ricerche manuali degli offset. Aggiungi in entrambe le viste un indicatore visibile della lunghezza in byte della selezione di testo corrente, seguendo il posizionamento in basso a destra suggerito nell’issue. Il lavoro è completato quando la selezione di byte in uno dei due campi mostra la lunghezza corrispondente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
TypeScript
Stelle
833
Fork
197
Merge medio
5m
PR unite (30g)
2

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di duneanalytics/evm.codes

Tutte le issue di duneanalytics/evm.codes

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.