ethereum / hevm

symbolic EVM evaluator
https://hevm.dev
GNU Affero General Public License v3.0
225 stars 46 forks source link

Fix trace source mapping and indexed event args #446

Closed arcz closed 7 months ago

arcz commented 7 months ago

Description

Source mapping in traces was broken due to the fact that simply matching by code hash is not robust. This is because we strip bytecode metadata before hashing in SolContract and contracts have code hash unstripped. The findSrc function already handles this. findSrc is unfortunately also bugged for contracts with immutables and SolContract probably shouldn't strip metadata before hashing but that's for another PR.

This PR also implements indexed event arguments and improves display by showing argument names.

Related issue https://github.com/crytic/echidna/issues/886.

Checklist