0

I am trying to send bep20 tokens by using smart contract's transfer method, kindly refer code snippet mentioned below

let contract= new web3.eth.Contract(contractABI, tokenaddress, {from: fromAddress});
const receipt = await contract.methods.transfer(toAddress, amount).send({from: fromAddress, gas: web3.utils.toHex(400000), value: '0x00'});

but it's not working, transaction failed with following error

Transaction has been reverted by the EVM:

{
   "type":"0",
   "from":"0x9c5bf52f80beeec4e0ddfa90de519d2402cda661",
   "to":"0xc896494eca026c73e483a72787d298d8c959a8d9",
   "status":"0",
   "cumulativeGasUsed":"13738916",
   "logsBloom":"0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
   "logs":[
      
   ],
   "transactionHash":"0x79f9225a480097a686b721360324fe330ab6673eed4010421490e562b377cb3c",
   "gasUsed":"21070",
   "blockHash":"0x19314a532cb7efddc7441e071ab4a88606e39a2e3d1ce18dcefbf13f0ab6c97a",
   "blockNumber":"31133172",
   "transactionIndex":"124",
   "effectiveGasPrice":"3000000000"
}

I tried using the Remix Debugger as well, but I'm getting error, How can I debug this transaction and get more details in order to resolve this error?

eglease
  • 2,445
  • 11
  • 18
  • 28

0 Answers0