Probably didn't do this right, but looking at the way it was done in the token-request-app it looks like @aragon/os/contracts/common/EtherTokenConstant.sol was imported, and then the token was checked to see if it was ERC20 or ETH, then the function proceeded accordingly. Since lock-app uses the token variable it seemed like it would be easiest to just point that variable to the type of token that is being locked. I changed the initialization of token to uint256 and then the initialize() function defines it as ERC20() or ETH depending on the input. Does that work?
Probably didn't do this right, but looking at the way it was done in the token-request-app it looks like
@aragon/os/contracts/common/EtherTokenConstant.sol
was imported, and then the token was checked to see if it wasERC20
orETH
, then the function proceeded accordingly. Since lock-app uses thetoken
variable it seemed like it would be easiest to just point that variable to the type of token that is being locked. I changed the initialization oftoken
touint256
and then theinitialize()
function defines it asERC20()
orETH
depending on the input. Does that work?