Hi everyone. Can i receive erc20 tokens as easy as eth (receive function) in smart contract without increaseAllowance and transfer. Need to do ico and add payment methods as much as possible
Apr 13, 2021, 10:52 PM
Unfortunately no. In difference to eth, the token transfers actually take place in the respective token contract while eth transfers take place in your contract. You unfortunately have to go the way with approve -> transfer
Apr 13, 2021, 10:58 PM
Thank you for answer! How can i approve without users private keys for more usability for example through web client, wallets etc i dont know. There is the problem that most of clients keep their money in binance and know absolutely nothing about private keys
Apr 13, 2021, 11:09 PM
Yes, you approve that through your website and for example web3 or ethersjs with MetaMask. Both of them work on Client-Side and do not reveal the private keys of the users.
Apr 14, 2021, 5:36 AM