Hello,
I am using web3js, Infura, and Truffle on the Ropsten testnet to do an ERC20 transfer (smart contract object is using the send()
method.
I am able to print the estimateGas()
for the ERC20 transfer, but when I use send()
, I get the following: Error: execution reverted: ERC20: transfer from the zero address
const transfer_funds = quad_ek.methods.transfer(tenth_account, web3.utils.toWei("15000000"))
const gas_transfer = await transfer_funds.estimateGas({
from: signInfo.address,
})
console.log("gas for transfer", gas_transfer)
const tx_2 = await transfer_funds.send({
from: signInfo.address,
gas: await transfer_funds.estimateGas(),
gasPrice: gasPrice
})
console.log("tx_2", tx_2)
Output:
gas for transfer 52395
Error: execution reverted: ERC20: transfer from the zero address
0x08c379a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002545524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373000000000000000000000000000000000000000000000000000000