rea-reverse

EVM function selector extractor: selectors, arguments and storage from bytecode

Paste deployed (runtime) contract bytecode to list its 4-byte function selectors with inferred argument types and state mutability, plus the storage layout and compiler metadata. No ABI, verified source or RPC needed.

Your bytecode never leaves your browser. EVMole runs as WebAssembly in a Web Worker on your device. Nothing is uploaded. How to verify this yourself

Open the tool on its own page (no ads, no analytics)

A deployed smart contract does not carry its ABI. What it carries is bytecode, and at the start of almost every Solidity or Vyper contract that bytecode contains a dispatcher: a sequence of comparisons that matches the first four bytes of the call data against the selectors of the external functions the contract supports. Those selectors, and a good amount of information about each function, can be read back from the bytecode alone.

This tool does that inside your browser. You paste runtime bytecode or pick a file, and the page lists the selectors it finds, together with the argument types, state mutability and storage layout it can infer. The bytecode never leaves your machine.

How to use

  1. Get the runtime (deployed) bytecode: eth_getCode for the address on a node you use, the deployedBytecode of a Hardhat or Foundry artifact, or solc --bin-runtime. Not the creation code.
  2. Paste the hex into the box above (a 0x prefix and line breaks are fine) and press Extract selectors, or load a file with hex text or raw bytes.
  3. Read the Functions table: each selector with its inferred arguments and mutability. Then check Storage layout, if the code touches storage, and Compiler metadata for the solc version.

Real example output

We fetched the runtime code of Multicall3 on Ethereum mainnet with eth_getCode (the command is below), pasted it into this page and copied what it displayed. Layout condensed (label and value on one line); every value is verbatim.

Sample: the runtime bytecode of Multicall3 at 0xcA11bde05977b3631167028862bE2a173976CA11 on Ethereum mainnet (source on GitHub, MIT license, Copyright (c) 2023 Matt Solomon), fetched from a public RPC node on 2026-11-02 (github.com/mds1/multicall3)

Summary
Input                     Pasted hex
Bytecode size             3808 B
Functions                 16
Matched in offline table  0
Engine                    EVMole 0.9.3

Functions (16)
Selector    Signature  Inferred arguments                 Mutability
0x0f28c97d  UNKNOWN    (none)                             view
0x174dea71  UNKNOWN    (address,uint256,uint256,bytes)[]  payable
0x252dba42  UNKNOWN    (address,bytes)[]                  payable
0x27e86d6e  UNKNOWN    (none)                             view
0x3408e470  UNKNOWN    (none)                             view
0x399542e9  UNKNOWN    bool,(address,bytes)[]             payable
0x3e64a696  UNKNOWN    (none)                             view
0x42cbb15c  UNKNOWN    (none)                             view
0x4d2301cc  UNKNOWN    address                            view
0x72425d9d  UNKNOWN    (none)                             view
0x82ad56cb  UNKNOWN    (address,uint256,bytes)[]          payable
0x86d516e8  UNKNOWN    (none)                             view
0xa8b0574e  UNKNOWN    (none)                             view
0xbce38bd7  UNKNOWN    bool,(address,bytes)[]             payable
0xc3077fa9  UNKNOWN    (address,bytes)[]                  payable
0xee82ac5e  UNKNOWN    uint256                            view

Compiler metadata
ipfs  1220bb2b5c71a328032f97c676ae39a1ec2148d3e5d6f73d95e9b17910152d61f162
solc  0.8.12 (00080c)

What it does

Input. Paste hexadecimal runtime bytecode into the text area. A 0x prefix is optional and whitespace (spaces, line breaks) is ignored, so you can paste a copied block as is. You can also choose a file; the file may contain hex text or the raw bytes, and the page handles both. Limits: up to 1 MiB of bytecode, up to 4 MiB of input, and a 30-second time limit for the analysis.

Output. For each function the analyzer finds, you get:

  • the 4-byte selector, such as 0xa9059cbb
  • the byte offset of the function body in the bytecode
  • the dispatch type, telling you how the function is reached from the dispatcher
  • the inferred argument types, such as address,uint256
  • the inferred state mutability: pure, view, payable or nonpayable

Beyond the function list, the report also shows:

  • Storage layout: the storage slots the code touches, with offset and inferred type, and which selectors read or write each slot. Transient storage (TLOAD/TSTORE) is included.
  • Compiler metadata: the CBOR block that solc and other compilers append to the end of the runtime code, decoded where possible. It often contains the solc version and an IPFS hash of the metadata file.

You can export the whole result as JSON to keep it, diff it against a later version, or feed it to other tools.

Function names

A selector is the first four bytes of keccak256 of the function signature, for example keccak256("transfer(address,uint256)"). A hash cannot be reversed, so a name can never be “decoded” from bytecode. The only way to attach a name is to look the selector up in a list of known signatures.

The page ships with a built-in, offline signature table of a little over two hundred common signatures: ERC-20, ERC-721 and ERC-1155, Ownable, AccessControl, Uniswap and similar widely used interfaces. It does not query 4byte.directory or any other online database. A selector found in the table is labeled Offline table; anything else is labeled Unknown. If a table entry’s parameters do not agree with the parameters inferred from the bytecode, the page warns you that this may be a selector collision or an inference error. Four-byte selectors do collide, so a name match is a hypothesis, not proof.

How it works

The analysis engine is EVMole 0.9.3, compiled to WebAssembly and run in a Web Worker so the page stays responsive. EVMole does not need source code or an ABI. It executes the dispatcher symbolically to find the selector comparisons and the jump targets they lead to, then follows each function body to see how it reads call data (which suggests the argument types), whether it checks CALLVALUE (payable or not), and which storage and state-changing opcodes it reaches (view, pure or nonpayable). The same tracking of SLOAD, SSTORE, TLOAD and TSTORE produces the storage layout.

The metadata decoder looks at the length field in the last two bytes of the code and parses the CBOR map in front of it, which is where solc writes keys such as solc and ipfs.

The same EVMole version is what the REA command line uses for inspect-evm-interface, so you can cross-check the browser result offline; see the guide linked below.

How your bytecode stays private

Your bytecode is not uploaded. That follows from how the page is built:

  • The extractor runs in a separate frame served from rea-reverse.com, and the analysis runs in a Web Worker inside it, on your device. The worker downloads the EVMole WebAssembly file (about 470 KB) from rea-reverse.com, under /_astro/, as soon as the page loads, so after that the analysis works even with the network turned off.
  • The worker runs under a Content Security Policy that allows requests only to its own origin, rea-reverse.com, which it needs to load that .wasm file. Any other network access from the worker is blocked by the browser.
  • This page shows one ad, below the article. The ad script runs on tools.rea-reverse.com; the frame is a different origin, so the browser does not let the ad script, or any other script on this page, read the bytecode you paste or the results.
  • The frame’s Content Security Policy blocks every request its scripts could make (connect-src 'none', no third-party resources at all). The frame cannot open windows or navigate this page by itself; only a link you click in the report can open a page. The only things it passes to this page are its height and the analytics events below.
  • The only analytics event is evm_analyze. It carries success or an error code, a bucket for the number of functions found, and a bucket for the duration. It never contains bytecode, selectors, names or any other content. The frame hands it to this page, which sends it. The full list of events is on the privacy page.
  • Prefer no ads and no analytics at all? Open the extractor on its own page.

How to verify this yourself

  1. Open your browser’s developer tools on the Network tab and load this page. Requests to rea-reverse.com are the frame: its HTML, styles, fonts and scripts, and the worker script /_astro/evm-worker-*.js. Requests to Google domains are the ad on this page.
  2. Clear the log, then paste bytecode and run an analysis. Type domain:rea-reverse.com in the filter box: the only new requests are a fresh worker, started for the next run, and its own evmole_bg-*.wasm, both from rea-reverse.com and often served from the cache. None of them carries your bytecode. Ad requests may continue, but they come from this page and carry nothing from the frame.
  3. Click the evm-selectors/ document from rea-reverse.com and open Headers: its Content-Security-Policy has connect-src 'none', and frame-ancestors https://tools.rea-reverse.com. In Chrome, Application > Frames also shows the frame’s origin and policy. The worker runs under default-src 'none'; script-src 'self' 'wasm-unsafe-eval'; connect-src 'self': connect-src 'self' lets it load that .wasm file and nothing else.
  4. Check the isolation: in the Console, with the context set to top, run document.getElementById('tool-frame').contentDocument. It returns null. frames[0].document throws a SecurityError. That is what the ad script gets too.
  5. Or load the page, wait for it to finish loading, go offline, and run the analysis. It still works.

Limitations

Read the output as inference from bytecode, not as a verified ABI.

  • State mutability is inferred from the bytecode and can differ from what the source declares. For example, a function declared view that never actually reads state may be reported as pure. The compiler and optimizer can also change what is visible.
  • EOF contracts are not supported yet. Code that starts with 0xEF00 (the EVM Object Format) is rejected.
  • You need runtime (deployed) bytecode, not creation/init code. Creation code contains a constructor and copies the runtime code into memory; its dispatcher is not the one you want. With solc, use --bin-runtime, not --bin.
  • Proxies show only the proxy’s own selectors. A proxy forwards unknown calls to an implementation contract with DELEGATECALL. To see the real interface, analyze the implementation contract’s bytecode.
  • Argument types are inferred. Simple types are usually right. Nested structs, arrays and other dynamic types may be reported imprecisely.
  • Other compilers vary. Vyper output or hand-written bytecode can produce different, sometimes less complete, results than typical solc output.
  • No source and no decompilation. The tool recovers the interface and storage layout, not the logic. It does not produce Solidity or any other source.
  • An empty or short list does not prove that nothing else is callable. Unusual dispatchers may hide functions from the analysis.

Compliance

Use this tool on contracts you wrote, contracts you are authorized to review, or public contracts whose bytecode is published on chain. Respect the licenses of the code you analyze and the laws that apply to you. Recovering an interface does not grant any right to the code, and the tool gives no advice on exploiting contracts.

Command-line equivalent

Fetch the runtime code with a plain JSON-RPC call (any node you are allowed to use; output cut after the first bytes):

$ curl -s -X POST -H 'content-type: application/json' --data '{"jsonrpc":"2.0","id":1,"method":"eth_getCode","params":["0xcA11bde05977b3631167028862bE2a173976CA11","latest"]}' https://ethereum-rpc.publicnode.com
{"jsonrpc":"2.0","id":1,"result":"0x6080604052600436106100f35760003560e01c80634d2301cc1161…64736f6c634300080c0033"}

Save that response as multicall3.json. Foundry's cast also lists selectors from bytecode offline. It is shown without output: Foundry was not installed on the machine we captured this page with, so we did not run it.

$ cast selectors "$(jq -r .result multicall3.json)"

FAQ

How do I get function selectors from bytecode?

Paste the runtime bytecode here and press Extract selectors. EVMole, compiled to WebAssembly, follows the dispatcher that compares the first four bytes of the call data with each selector, and lists every selector it reaches, 16 for Multicall3 above.

Can I extract an ABI from bytecode?

Partly. You get each selector with its inferred argument types and state mutability, which is the shape of an ABI, but not function or parameter names: a selector is a hash prefix of the signature and cannot be reversed. Names appear only when a selector is in the page's offline table.

How do I read an unverified contract's ABI?

Fetch its runtime code with eth_getCode and paste it here. Treat the result as inference, not a verified ABI. If you get few or no selectors, the contract may be a proxy: analyze the implementation contract it delegates to instead.

Does it look up function names online?

No. Names come only from the offline table built into the page, which is why every Multicall3 selector above shows UNKNOWN. If you look selectors up in a public database yourself, treat any match as a hypothesis, because selectors collide.

Why does a function show as pure when the source says view?

Mutability is inferred from what the bytecode actually does. If a view function never reads storage or environment data, nothing in the code distinguishes it from pure. The reverse can also happen. Compare against the ABI when you have it.

Is the storage layout the same as solc's storage layout output?

No. It is reconstructed from the slots the code accesses. It shows slots, offsets, inferred types and which selectors touch them, but not variable names, and slots computed at runtime (for example mapping entries) may not be fully represented.

Updated