Skip to main content

EVM Storage Layout Extractor

This project is a library that is able to ingest EVM bytecode and discover an approximate storage layout for the contract described by that bytecode. It is not intended to be a full decompiler, but is instead a tool highly specialised for performing this discovery process.

See our announcement for more details or check the deepdive post on our blog.

This discovery process is performed, in broad strokes, as follows:

  1. Bytecode is ingested and disassembled into an instruction stream that is amenable to analysis. This is a sequence of Opcodes that is equivalent to the bytecode.
  2. The stream of instructions is executed symbolically on a specialised EVM implementation. This execution is both speculative and total, exploring all possible code paths that can influence the type attributed to a given storage location.
  3. For each value seen in the program during execution, the VM builds a symbolic value (a little tree structure) that represents the operations performed to that particular piece of "data".
  4. These execution trees are passed to a type inference process. This process starts by lifting, which turns low-level constructs into more-general high-level ones. The results of this are then fed to inference rules that output type inference judgements about the trees they analyse. Finally, these inferences are combined with a unifier to perform whole-program type inference.
  5. The resolved types associated with each storage slot are then turned into a storage layout that describes the type of each storage slot that was encountered.

For more information on the process with specific reference to concrete pieces of code, see the documentation in lib.rs. This also provides a basic usage example for the library, though more complex ones can be found in the tests.

Extending the Library

The primary means of extending this library to get better layouts is by extending the type inference engine. This is done by either writing new lifting passes or inference rules, and you can find more information on this process in the documentation on extending the library.

Contributing

If you want to contribute code or documentation (non-code contributions are always welcome) to this project, please take a look at our contributing documentation. It provides an overview of how to get up and running, as well as what the contribution process looks like for the library. We are also available on our Telegram group if you have any questions.

Metadata

Release files for storage-layout-extractor 0.6.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for storage-layout-extractor 0.6.3
File Size Uploaded
storage_layout_extractor-0.6.3.tar.gz 374.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for storage-layout-extractor 0.6.3
File
storage_layout_extractor-0.6.3-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
storage_layout_extractor-0.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
storage_layout_extractor-0.6.3-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
storage_layout_extractor-0.6.3-cp312-cp312-macosx_10_12_x86_64.whl CPython 3.12 CPython 3.12 macOS 10.12+ x86-64 Details
storage_layout_extractor-0.6.3-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
storage_layout_extractor-0.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
storage_layout_extractor-0.6.3-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
storage_layout_extractor-0.6.3-cp311-cp311-macosx_10_12_x86_64.whl CPython 3.11 CPython 3.11 macOS 10.12+ x86-64 Details
storage_layout_extractor-0.6.3-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
storage_layout_extractor-0.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
storage_layout_extractor-0.6.3-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details
storage_layout_extractor-0.6.3-cp310-cp310-macosx_10_12_x86_64.whl CPython 3.10 CPython 3.10 macOS 10.12+ x86-64 Details

Total release size: 17.3 MB

Release files / storage_layout_extractor-0.6.3.tar.gz

Download URL storage_layout_extractor-0.6.3.tar.gz
Size 374.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bf64e54862987df538e40dac57a57c5e39309e06abf0fc5119f03b37a4e86352
BLAKE2b-256 checksum
How to use checksums
947891c9dd1633a7703cc8645044ea937f963cba913cf1f16d4b587e95734e24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp312-cp312-win_amd64.whl

Download URL storage_layout_extractor-0.6.3-cp312-cp312-win_amd64.whl
Size 450.5 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
9eef79fd9c81635b52913d62d17c266baffadae52664a7e6eb1af859510f9a14
BLAKE2b-256 checksum
How to use checksums
17e187d94f22114c31e1486d48646c56e8be8ff547b882166d9e7cc3a5f6e661
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL storage_layout_extractor-0.6.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.0 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
8313291061fd77e78486cf70babce2b832d355a3593d22ca0657265cc1f9965a
BLAKE2b-256 checksum
How to use checksums
87965af10346ac9df9494d77bcb1fe9277a06835f14f7988a53156f0f35e2075
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp312-cp312-macosx_11_0_arm64.whl

Download URL storage_layout_extractor-0.6.3-cp312-cp312-macosx_11_0_arm64.whl
Size 578.9 kB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
c69b9fb973c7064a9040b7ab4905294407c88d4368e8c87dc32cf26258f7489f
BLAKE2b-256 checksum
How to use checksums
ece58a76b6ed41bb41dcdcd0ee452606e2429e250669e1869d1fd2205f857bb9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp312-cp312-macosx_10_12_x86_64.whl

Download URL storage_layout_extractor-0.6.3-cp312-cp312-macosx_10_12_x86_64.whl
Size 602.1 kB
Tags CPython 3.12 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
d10e0def72fb75651660891950447a6c28d3618b71dc9f8f9bcf0a64b863602e
BLAKE2b-256 checksum
How to use checksums
f9211a6357dfd4f7420995b173fec31ce3baf2f7882f968faa52945877287c20
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp311-cp311-win_amd64.whl

Download URL storage_layout_extractor-0.6.3-cp311-cp311-win_amd64.whl
Size 451.0 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3fe4d5b858637d8718a766c8597bc46a79680c8b23dd4055848bccf371897c8e
BLAKE2b-256 checksum
How to use checksums
fa4cac7094c0ed84adeafd643a5cf8c29530f6bd4e7553e29d04127cb9804866
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL storage_layout_extractor-0.6.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.0 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
d40bf552b7bd92b01a812acbd4feb23cbf52bfc0797668e7ed9b5a36850ac52e
BLAKE2b-256 checksum
How to use checksums
3e2450d3837ab9b45bacb46fef88b44af1cb88d86026c960207eda19430781d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp311-cp311-macosx_11_0_arm64.whl

Download URL storage_layout_extractor-0.6.3-cp311-cp311-macosx_11_0_arm64.whl
Size 579.9 kB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
860469bb6c9dacefcfa7953c2885c49b558b5812f77a965a25fb8e1824e7a804
BLAKE2b-256 checksum
How to use checksums
2d086b2018756715adfce634506dedc21414083f2fa5296dc8eb1b3450fe7a0a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp311-cp311-macosx_10_12_x86_64.whl

Download URL storage_layout_extractor-0.6.3-cp311-cp311-macosx_10_12_x86_64.whl
Size 604.1 kB
Tags CPython 3.11 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
1e08afdc2687a1d76a5b1ebef0f1b56ef29eb9d81bb790929112ea3ec7d9ad10
BLAKE2b-256 checksum
How to use checksums
39ad3bdbea7830a7bb452e3aa1f8181ab3fa16683f80e71cfb5b2a847d273c57
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp310-cp310-win_amd64.whl

Download URL storage_layout_extractor-0.6.3-cp310-cp310-win_amd64.whl
Size 451.0 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
4760e6330937c220f5156aecbc968b9399a40765afe44c01b1b75a3216179e15
BLAKE2b-256 checksum
How to use checksums
8d3d9426573339aad6feb9b112ef841765438348d6728a0ae1b7bab3bcbc6da3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL storage_layout_extractor-0.6.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 4.0 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
f6f47c8ee242418738d21d5a30bf5f4c72ed623b52cee58588f8478d505bb0d8
BLAKE2b-256 checksum
How to use checksums
fc77bcd9dfe2c98cbc56a04c31fb61613dc7f6afec3a8003218642f56a70a662
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp310-cp310-macosx_11_0_arm64.whl

Download URL storage_layout_extractor-0.6.3-cp310-cp310-macosx_11_0_arm64.whl
Size 579.9 kB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
08d696eba7558c006f146e1cd7a45ff361dd851ce4dbc36d959575f79d403d5c
BLAKE2b-256 checksum
How to use checksums
087e4cac060dc5c2233b6c922a92b84021cc97cb9535284c5893cfc7ef75afed
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release files / storage_layout_extractor-0.6.3-cp310-cp310-macosx_10_12_x86_64.whl

Download URL storage_layout_extractor-0.6.3-cp310-cp310-macosx_10_12_x86_64.whl
Size 604.1 kB
Tags CPython 3.10 macOS 10.12+ x86-64
SHA-256 checksum
How to use checksums
f4ee5ffb17ebf89875810f84e4cd872e184fed578066ab2cd58e9fdcb32678fc
BLAKE2b-256 checksum
How to use checksums
a47b0e143e10195d4c3c5bf87cbf9143285eb715f6d668a5fc7b81e6e2abf020
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.6.3 This release

13 release files

0.6.2

13 release files

0.6.0

13 release files

0.5.4

14 release files

0.5.3

1 release file

0.5.2

1 release file

0.5.1

1 release file

0.5.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page