acuarica / evm

A Symbolic Ethereum Virtual Machine (EVM) bytecode interpreter, parser and decompiler, along with several other utils for programmatically extracting information from EVM bytecode.
https://acuarica.github.io/evm/
MIT License
62 stars 9 forks source link

Introduce `Memory` class to represent context memory #130

Closed acuarica closed 3 months ago

acuarica commented 3 months ago

Context memory is represented with a plain object. Plain objects only allows keys to be either string or Symbol. This can pose problems where memory locations are realized as bigints, needing to convert to a number to query for memory locations.

This PR introduces a Memory class to support context memory using bigint directly. Moreover, by having a unique access point for memory locations, it can be easier to invalidate certain or all locations in a given Memory.

github-actions[bot] commented 3 months ago

size-limit report 📦

Path Size
dist/sevm.js 17.4 KB (0%)
codecov[bot] commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 94.24%. Comparing base (e03ddd3) to head (be8980c).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #130 +/- ## ========================================== + Coverage 94.14% 94.24% +0.10% ========================================== Files 23 23 Lines 5362 5456 +94 Branches 931 932 +1 ========================================== + Hits 5048 5142 +94 Misses 299 299 Partials 15 15 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.