Revisit canonical_name usage
Open
meta
- Dominant language
- Python
- Stars
- 6.4k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
Given that we support now compilation unit with multiple contracts with the same name, we might need to revisit
https://github.com/crytic/slither/blob/4c976d5af56219eeef079e03a35009af3e03644d/slither/core/declarations/function_contract.py#L24-L31
And similar definition of `canonical_name`, as it might create issues.
One solution would be to use the source mapping definition of the contract to ensure uniqueness.
Related: https://github.com/crytic/slither/pull/1535#discussion_r1083792395
Contributor guide
Assessment
This issue has not been assessed yet.