vyperlang / vyper

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

external interface omits default parameter values #3311

Open xrchz opened 1 year ago

xrchz commented 1 year ago

Version Information

What's your issue about?

> cat bug1.vy
@external
def foo(x: uint256 = 3):
  pass
> vyper -f external_interface bug1.vy

# External Interfaces
interface Bug1:
    def foo(x: uint256): nonpayable

If you use the interface produced directly, you cannot call Bug1.foo(). But it works if you import bug1 as Bug1.

charles-cooper commented 1 year ago

probably related https://github.com/vyperlang/vyper/issues/3170