frontend
frontend copied to clipboard
contract ABI: jump to method implementation
It is nice to have a link next to contract method (read or write) to its actual implementation in contract source code
In theory we can achieve it by doing something like this
- Get the selector
- Find this selector in the selector switch in the raw proxy or implementation bytecode (http://blog.openzeppelin.com/deconstructing-a-solidity-contract-part-iii-the-function-selector-6a9b6886ea49)
- Get the source maps of the contract in whose bytecode we found the selector
- Using the JUMP instruction from the selector switch and source map, find the desired line in the desired file
- Check function name just in case
🔗 rust team issue - https://github.com/blockscout/blockscout-rs/issues/571