vyperlang / vyper

Pythonic Smart Contract Language for the EVM
https://vyperlang.org
Other
4.83k stars 789 forks source link

Ambiguous Imports #3990

Open cyberthirst opened 3 months ago

cyberthirst commented 3 months ago

Version Information

If a module is named after one of the built-in interfaces Vyper provides and if that module is accessed via the path ethereum.ercs, then the module will be shadowed by the built-in interface. For example, if a module is named ERC20 and is accessed via from ethereum.ercs import ERC20, the Vyper builtin ERC20 will be imported instead.

Similarly, if a module vyper.interfaces.ERC20 is defined and imported, the compiler would fail with vyper.exceptions.ModuleNotFound: vyper.interfaces.ERC20 (hint: try renaming `vyper.interfaces` to `ethereum.ercs`).

credits: @trocher