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
46 stars 5 forks source link

When decompiling, replace reference to things like `address(this.code[0x5c52:(0x5c52+0x20)])` by it's content #74

Open ytrezq opened 5 months ago

ytrezq commented 5 months ago

Very unclear to read. Please execute/evaluate such static expressions in order to get the underlying address being called.

Eventually do the same for variables (for example, if the code does something like local29348 = 0x7a250d5630b4cf539739df2c5dacb4c659f2488d; then replace replace all occurrences of local29348 by 0x7a250d5630b4cf539739df2c5dacb4c659f2488d since it's a static expression).

acuarica commented 5 months ago

Hi @ytrezq, thanks for sending this. Would you be able to provide the address or bytecode where this happens?

ytrezq commented 5 months ago

Hi @ytrezq, thanks for sending this. Would you be able to provide the address or bytecode where this happens?

Of course, 0xBCd3a47e4d0000cf170E25d1bD3d53F7C08be0A6 on the Ethereum mainnet.

acuarica commented 5 months ago

Related #16