vyper Version (output of vyper --version): commit 4b4e188ba83d28b5dd6ff66479e7448e5b925030
Issue description
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`).
Version Information
vyper --version
): commit 4b4e188ba83d28b5dd6ff66479e7448e5b925030Issue description
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 namedERC20
and is accessed viafrom ethereum.ercs import ERC20
, the Vyper builtinERC20
will be imported instead.Similarly, if a module
vyper.interfaces.ERC20
is defined and imported, the compiler would fail withvyper.exceptions.ModuleNotFound: vyper.interfaces.ERC20 (hint: try renaming `vyper.interfaces` to `ethereum.ercs`)
.credits: @trocher