Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface implementation enforcing units? #1303

Closed
robrobbins opened this issue Feb 27, 2019 · 1 comment
Closed

Interface implementation enforcing units? #1303

robrobbins opened this issue Feb 27, 2019 · 1 comment
Labels
bug Bug that shouldn't change language semantics when fixed.

Comments

@robrobbins
Copy link

robrobbins commented Feb 27, 2019

Version Information

  • vyper Version (output of vyper --version): 0.1.0b8
  • OS: linux
  • Python Version (output of python --version): 3.6
  • Environment (output of pip freeze):
    pkg-resources==0.0.0
    pycryptodome==3.7.3
    vyper==0.1.0b8

What's your issue about?

Compiler erroneously enforcing units on interface method returns

  • full output of the error you received:
    vyper.exceptions.StructureException: Contract does not comply to supplied Interface(s).
    Missing interface functions:
    ... ( any method that does not match the return unit. Returning wei_value vs uint256 for example )

  • what command you ran: vyper

  • the code that caused the failure (see this link for help with formatting code)

    @public
    @constant
    def balanceOf(owner: address) -> wei_value:
    return self.balances[owner]

How can it be fixed?

Wave a magic wand whilst yelling Non Expecto Metrum!

@jacqueswww jacqueswww added the bug Bug that shouldn't change language semantics when fixed. label Feb 28, 2019
@jacqueswww
Copy link
Contributor

jacqueswww commented Feb 28, 2019

Thanks @robrobbins ! I think we should just fix it - ABI can't specify units - so unit checking at this level should be ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug that shouldn't change language semantics when fixed.
Projects
None yet
Development

No branches or pull requests

2 participants