vyperlang / vyper

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

initializer hint improvement #4092

Closed charles-cooper closed 3 weeks ago

charles-cooper commented 1 month ago

Version Information

What's your issue about?

when a module is not imported that needs to be initialized, the hint does not say where to find the module. e.g.:

InitializerException: `base_token` uses `ownable`, but it is not initialized with `ownable`

  (hint: try importing ownable first)

  contract "tmp/token.vy:4", line 4:0 
       3
  ---> 4 initializes: base_token
  -------^
       5 exports: base_token.IERC20

How can it be fixed?

Fill this in if you know how to fix it.