blockscout-rs
blockscout-rs copied to clipboard
solidity methods jumps: fix
There is a tool for parsing some of compiler outputs to provide mapping from solidity public method to the source code place. Some changes are required in this tool:
- look for whatsabi implementation of finding selectors in bytecode, add missing logic to the
find_selector
function - Write tests that cover different situations with selectors,
0x00112233
,0x00001122
etc - remove
evm.methods_indetifiers
from input of function, get methods from abi (filter only functions and hash its signatures) - [OPTIONAL] For now we use
output.sources
from compilation to get file ids, however we don't have those data in database :( So, if possible, find a way to get mappingfile_id -> file_path
without compiling contract. Maybe you can just sort all sources ?) I suggest to look at solidity source code.
Not sure where to store this code, you can make PR in my local repo OR you can store code locally and then use it for the smart-contract-verifier task: [todo: add issue link]