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

Revisit canonical_name usage #1621

Open
montyly opened this issue Jan 23, 2023 · 1 comment
Open

Revisit canonical_name usage #1621

montyly opened this issue Jan 23, 2023 · 1 comment
Labels

Comments

@montyly
Copy link
Member

montyly commented Jan 23, 2023

Given that we support now compilation unit with multiple contracts with the same name, we might need to revisit

if self._canonical_name is None:
name, parameters, _ = self.signature
self._canonical_name = (
".".join([self.contract_declarer.name] + self._internal_scope + [name])
+ "("
+ ",".join(parameters)
+ ")"
)

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: #1535 (comment)

@0xalpharush
Copy link
Contributor

Related: issues when contracts have the same name #1372

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

No branches or pull requests

2 participants