Why using the Transfer method is showing the value of the erc20 that I want to transfer while with a custom method is always showing 0 ETH on metamask instead of the token that I'm transferring via the contract? Is there a way to show the value of the erc20 that the users are transferring using my custom function and isn't it dangerous to let user transfers all their erc20 tokens while they only see 0 ETH on metamask...

Please note that with transfer method I mean transaction data is contract.methods.transfer(... and with custom method I mean data is contract.methods.mycustomcontractfunction(...


It seems that MetaMask only shows an ERC20 transfer if the function signature is transfer or transferFrom.

The problem is that until the transaction is mined in a block it not possible to be sure the transaction involves an ERC20 token transfer.

| improve this answer | |

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