palkeo / panoramix

Ethereum decompiler
MIT License
810 stars 212 forks source link

wrong log parameters #65

Open pUawXk1Hw46LBrIi opened 1 year ago

pUawXk1Hw46LBrIi commented 1 year ago

decompile Wrapped Ether (WETH) contract on main chain. decompilation = decompile_address('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', None)

It gives log Transfer( address from=amount, address to=caller, uint256 value=recipient) which should be log Transfer( address from=caller, address to=recipient, uint256 value=amount)

I also found the log reco in the trace is strange too. ('log', ('param', 'amount'), 100389287136786176327247604509743168900146139575972864366142685224231313322991, ('param', 'sender'), ('param', 'recipient')) I guess it should be: ('log', 100389287136786176327247604509743168900146139575972864366142685224231313322991, ('param', 'amount'), ('param', 'sender'), ('param', 'recipient'))

ytrezq commented 8 months ago

This come from me. You need to edit 4bytes sqlite database so it returns the correct log.