0

I am trying to make a payment gateway of sorts, that can be redistributed. Therefore, I can't have ERC20 token transfers run on a contract. Because I believe that 'approve' allows a contract access to an account's private key, and it requires the contract to send transactions. Is there a way to send ERC20 tokens without a contract through a web3 interface like MetaMask? Thanks, Tim

  • Yes, it is possible to perform a token transfer from javascript. – Ismael Feb 12 '22 at 17:53
  • @Ismael, is there any specific guide on it, any extra information I need to include in the request? – Timothy Feb 14 '22 at 05:37
  • It is should be pretty trivial see here for an example https://ethereum.stackexchange.com/questions/24828/how-to-send-erc20-token-using-web3-api. – Ismael Feb 14 '22 at 12:58
  • @Ismael, how would I work to tie this in with a user's MetaMask extension, the examples here seem rely on me holding the private key, which I won't. Additionally, I'd prefer it to work without the 'sign' method, as this shows a really dodgy warning message – Timothy Feb 14 '22 at 22:45
  • That's much easier, read this https://ethereum.stackexchange.com/questions/48522/pay-custom-erc20-token-with-metamask. – Ismael Feb 15 '22 at 01:32
  • This looks promising. Is there no way to include a token transfer as data in eth_sendTransaction call to MetaMask? (As MM no longer injects web3 – Timothy Feb 15 '22 at 04:41

0 Answers0