Skip to content

Disallow duplicate implements #4773

@pcaversaccio

Description

@pcaversaccio

This currently compiles:

from ethereum.ercs import IERC20

implements: IERC20
implements: IERC20  #  Duplicate `implements`.

balanceOf: public(HashMap[address, uint256])
allowance: public(HashMap[address, HashMap[address, uint256]])
totalSupply: public(uint256)


@external
def transfer(to: address, amount: uint256) -> bool:
    return True


@external
def approve(spender: address, amount: uint256) -> bool:
    return True


@external
def transferFrom(owner: address, to: address, amount: uint256) -> bool:
    return True

I think it would be sane to disallow duplicate implements of the same interface. See also #4772 (comment).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions