Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Event Signature Indexing Update --> Record Param Names and Indexed Fields as well #25

Open
maharshi365 opened this issue Jun 11, 2024 · 1 comment

Comments

@maharshi365
Copy link

Hi,

Would it be possible to add the param information as well as the indexed information to the signatures that are being stored. For example if we look up a generic ERC20 Transfer on etherface we see the following:

Search: 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
Result: Transfer(address,address,uint256)

I think it would be better to store the additional information to help make decoding uses cases easier. Below is what I suggest.

Search: 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
Result: Transfer(address indexed from, address indexed to, uint256 value)

@volsa
Copy link
Owner

volsa commented Jun 11, 2024

Technically it's pretty easy to implement (see this part) but two things that immediately come to mind

  1. How would you deal with identical signatures but different parameter names, e.g. foo(address a), foo(address b), foo(address c) and so on. Do you just return all possible parameter names (a, b, c,...)?
  2. Implementing this feature at this stage means the metadata of scraped signatures in the database becomes inconsistent, i.e. every new signature will have that extra information regarding parameter names but all previously scraped signatures won't. You could re-download and re-scrape all Solidity files stored in the database to fill these gaps but I'm not sure if it's worth the effort.

Anyhow, I won't work on this mainly because of lack of time and motivation (as can be seen by the amount of open issues).
However, I'd be happy to merge any PR if you feel motivated enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants