Skip to content

Interface implementation enforcing units? #1303

@robrobbins

Description

@robrobbins

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug that shouldn't change language semantics when fixed.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions