smart-contracts
smart-contracts copied to clipboard
TokenVault: Implementing full EIP-20 support
Previously we had a check for isToken() interface function. The check was important to test if the address is actually a token, wrong token would make claiming upon unsuccesful locking impossible.
However, isToken() is not part of the official EIP-20 token specification, making this particular implementation of the TokenVault TokenMarket specific.
TokenVault should support all EIP-20 tokens, including our SecurityToken.
The check is not needed anymore, since we inherit Recoverable, which enables us to claim any tokens which are not locked. Hence, removing the check.
isToken() is not part of the official EIP-20 token specification
@villesundell since isToken()
isn't part of EIP-20, would it make sense to get rid of StandardTokenExt
? StandardTokenExt
has only isToken
method and that always returns True.
Also, since isToken()
was always returning True
, there is not a significant benefit from this change, but sure its good to clean up if we have the bandwidth.
@voith I don't see a problem with isToken() per se (we have used it with practically all of our tokens, so maybe we should keep it, so the ABI would not change). The problem is that the TokenVault was depending on that, which is not EIP-20 compatible practice. Previously it was needed: we wanted to make sure the Vault is configured correctly, since claiming the tokens back was depending on the token address. Now we have a different mechanism for claiming.