I'm trying to compile the Uniswap Exchange contract using the latest
I first updated the ERC20 references to the new
token: ERC20 definition and set up an import
from vyper.interfaces import ERC20.
The next issue is with the
getExchange() function in the Factory interface.
vyper.exceptions.TypeMismatchException: line 68:15 Typecasting from base type address(ERC20) to address unavailable
This occurs on the following line:
assert self.factory.getExchange(self.token) == self
I tried to solve it by amending the
getExchange interface to:
def getExchange(token_addr: ERC20) -> address: constant
but this produces another error:
vyper.exceptions.InvalidTypeException: line 8: Invalid base type: ERC20 def getExchange(token_addr: ERC20) -> address: constant
How to get this to compile?