vyperlang / vyper

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

exports: interface does not work for inline interfaces #3959

Open charles-cooper opened 4 months ago

charles-cooper commented 4 months ago

Version Information

What's your issue about?

exports: interface does not work for interfaces which were declared inline. example:

# lib.vy
from ethereum.ercs import IERC20

asset: public(immutable(IERC20))

interface IAsset:
    def asset() -> address: view

implements: IAsset

@deploy
def __init__(asset_: IERC20):
    asset = asset_
# main.vy

from ethereum.ercs import IERC20

import lib
initializes: lib

exports: lib.IAsset

@deploy
def __init__(asset_: IERC20):
    lib.__init__(asset_)
charles-cooper commented 4 months ago

mildly related: https://github.com/vyperlang/vyper/issues/3954