Skip to content
This repository has been archived by the owner on Mar 1, 2024. It is now read-only.

Non-compliance mandatory tokenFallback #24

Closed
Agusx1211 opened this issue Oct 3, 2018 · 2 comments
Closed

Non-compliance mandatory tokenFallback #24

Agusx1211 opened this issue Oct 3, 2018 · 2 comments

Comments

@Agusx1211
Copy link

receiver.tokenFallback(msg.sender, _value, _data);

With this modification the StardardToken forces the contracts receiving tokens to implement the tokenFallback method; this causes the StandardToken.sol not to follow the ERC20 standard.

I believe this method is meant to replicate the mandatory fallback on the Ethereum network, if that is the case, may be a good idea to move this to MaticWETH.sol

Another possible solution is making a nonThrow call to tokenFallback and ignore a potential failure, that will not replicate the functionality of the mandatory fallback, but it will be ERC20 compliance.

@jdkanani
Copy link
Contributor

jdkanani commented Oct 4, 2018

Nice catch.

But, on child chain, we want to make sure people won't lose their tokens by sending any contract which doesn't support token transfer. MaticWETH.sol will be never be deployed on mainchain.

@jdkanani
Copy link
Contributor

jdkanani commented Jan 9, 2019

@Agusx1211 Closing this issue. Reopen if you have more questions.

@jdkanani jdkanani closed this as completed Jan 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants