Added props to ContractType for easy selector <-> signature mapping. Useful for looking up what a selector might be, or if a selector/topic is part of a known contract. Might follow this up with a command/plugin for tabular display output.
Or at least I knew them as selector/signature, but terminology seems to be different in this source. I went looking for official defs and they're all over the place as well. Even the Solidity ABI spec interchanges Method ID and selector. I did my best to stick within the convention but my naming is probably off.
I often find myself in a situation where I have an event topic or function or error selector that I'm curious if its a member of one of the contracts in my project. So it would be nice to have a method for easy lookup that doesn't require me to compute them manually every time.
How I did it
See code
How to verify it
Tests do
Checklist
[x] Passes all linting checks (pre-commit and CI jobs)
[ ] New test cases have been added and are passing
[ ] Documentation has been updated
[x] PR title follows Conventional Commit standard (will be automatically included in the changelog)
What I did
Added props to ContractType for easy selector <-> signature mapping. Useful for looking up what a selector might be, or if a selector/topic is part of a known contract. Might follow this up with a command/plugin for tabular display output.
Or at least I knew them as selector/signature, but terminology seems to be different in this source. I went looking for official defs and they're all over the place as well. Even the Solidity ABI spec interchanges Method ID and selector. I did my best to stick within the convention but my naming is probably off.
I often find myself in a situation where I have an event topic or function or error selector that I'm curious if its a member of one of the contracts in my project. So it would be nice to have a method for easy lookup that doesn't require me to compute them manually every time.
How I did it
See code
How to verify it
Tests do
Checklist