0

I have an smart contract where people had to send some ETH using a simple transfer. Some of them transferred ERC20 tokens and not ETH. Is there a way of sending this ERC20 tokens back to it's owners?

Just to make it clear: I am the owner of the smart contract trying to recover some users money, I don't have any bad intention and I have the private key of the contract deployer.

2

There is two different address in Ethereum. The one controlled by a private key (usable for a user). Smart contract that are address controlled by a code (no private key).

If you didn't put a function to handle ERC20 token in your contract, they are lost for the user that send ERC20 token.

You can handle token with a "safetransfer" function that revert transaction if your smart contract can't handle ERC20 tokens, but you have to implement it when deploying your smart contract.

There is a way to "add" this function after your deployment, but again, you need to anticipate it either (see "diamond standard").

I don't think I have a lot of hopes for your user to recover his ERC20 tokens.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.