web3js – How to Send ERC-20 Tokens Without ETH or Gas Fee Using Web3.js

erc-20ethereumjsinfuratokensweb3js

I am developing an app using Web3.js where users send an amount of tokens to a new wallet. What I want is forward the tokens to another wallet but I am unable because the wallets where tokens are received don't have ETH to pay gas fee. Are there any way to forward the tokens without ETH, I was thinking to use an account just for paying fees. For example Wallet A send 30 tokens to Wallet B, this wallet sign the transaction and Wallet C which have ETH will send the signed transaction so another Wallet D could receive the tokens. Is it possible?

Best Answer

  • Since each Ethereum transaction requires computational resources to execute, each transaction requires a fee. Gas refers to the fee required to conduct a transaction on Ethereum successfully. See these links to know more about fees: 1, 2.

  • Gas fees are paid in Ethereum's native currency, ether (ETH).

  • If you are looking for a centralized architecture, you can start with these links: 1, 2, 3. If you are not going to use smart contracts' approach and want to go with the EOA one, just simply send the (estimated gas * gas price) to the sender's account, before proceeding the token transfer. These links might be useful on the gas subject: 1, 2.

Hope this helps.

Related Topic