send-crypto icon indicating copy to clipboard operation
send-crypto copied to clipboard

Can't make an ERC20 Transaction Error: call revert exception!!!

Open elisabeth0bangoura opened this issue 3 years ago • 11 comments

  • I'm submitting a ... [ X] bug report [ ] feature request [ ] question about the decisions made in the repository [ ] question about how to use this project

I get this error when I want to make an ERC20 Transaction with the coins in the list. I use the Ropsten network: -> Error: call revert exception [ See: https://links.ethers.org/v5-errors-CALL_EXCEPTION ] (method="decimals()", data="0x", errorArgs=null, errorName=null, errorSignature=null, reason=null, code=CALL_EXCEPTION, version=abi/5.6.3)

Can someone help me with that?

elisabeth0bangoura avatar Jun 17 '22 20:06 elisabeth0bangoura

Hi @elisabeth0bangoura,

Can we see your code sample to have a better view

iamnotstatic avatar Jul 16 '22 21:07 iamnotstatic

Yes, @iamnotstatic

const privateKey = "MyPrivKey" const account = new CryptoAccount(privateKey, { network: "Ropsten", });

const txHash = await account .send("addressTo", 0.200, { type: "ERC20", address: "0xaD6D458402F60fD3Bd25163575031ACDce07538D", // DAI Ropsten Contract }) .on("transactionHash", console.log) // > "3387418aaddb4927209c5032f515aa442a6587d6e54677f08a03b8fa7789e688" .on("confirmation", console.log);

I get this error


Error: cannot estimate gas; transaction may fail or may require manual gas limit [ See: https://links.ethers.org/v5-errors-UNPREDICTABLE_GAS_LIMIT ] (

elisabeth0bangoura avatar Jul 16 '22 21:07 elisabeth0bangoura

@iamnotstatic The same Error happens when I do this:

const txHash = await account .send("addressTo", 0.200, { type: "ERC20", Name: "DAI", <---- })

elisabeth0bangoura avatar Jul 16 '22 21:07 elisabeth0bangoura

Hi @elisabeth0bangoura,

Based on observations I can see that there is nothing wrong with your code, it's most likely the ropsten network.

I tried the same code on rinkeby and it worked fine, so I'd advise you try rinkeby network or other ethereum testnet, like goerli, kovan

iamnotstatic avatar Jul 17 '22 09:07 iamnotstatic

Okay, thank you so much. I will try with rinkeby. But everything works with Mainnet too right?

Abdulfatai Suleiman @.***> schrieb am So. 17. Juli 2022 um 11:39:

Hi @elisabeth0bangoura https://github.com/elisabeth0bangoura,

Based on observations I can see that there is nothing wrong with your code, it's most likely the ropsten network.

I tried the same code on rinkeby and it worked fine, so I'd advise you try rinkeby network or other ethereum testnet, like goerli, kovan

— Reply to this email directly, view it on GitHub https://github.com/renproject/send-crypto/issues/45#issuecomment-1186460537, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZQVLMH5PYURE5BXMQAUHTVUPID5ANCNFSM5ZDLYB4Q . You are receiving this because you were mentioned.Message ID: @.***>

elisabeth0bangoura avatar Jul 17 '22 10:07 elisabeth0bangoura

Yeah, it should but notwithstanding you should verify.

iamnotstatic avatar Jul 17 '22 11:07 iamnotstatic

Will do, thanks!

Abdulfatai Suleiman @.***> schrieb am So. 17. Juli 2022 um 13:23:

Yeah, it should but notwithstanding you should verify.

— Reply to this email directly, view it on GitHub https://github.com/renproject/send-crypto/issues/45#issuecomment-1186488299, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANZQVLJFYMH4QDL6I6KD7RLVUPUMTANCNFSM5ZDLYB4Q . You are receiving this because you were mentioned.Message ID: @.***>

elisabeth0bangoura avatar Jul 17 '22 11:07 elisabeth0bangoura

I can help you pm me, email in my profile

placecodex avatar Jul 17 '22 12:07 placecodex

@iamnotstatic Do I have to add gasFee? Because I got a TransactionHash and it was successful, but got another Error ERC-20 Token Transfer Error (Unable to locate corresponding Transfer Event Logs), Check with Sender.

My Code now:

const testnetAccount = new CryptoAccount("MyPrivKey", { network: "rinkeby", });

await testnetAccount.send("SendTo", 0.884, { type: "ERC20", address: "0x95b58a6Bff3D14B7DB2f5cb5F0Ad413DC2940658", <---- Rinkeby DAI contract }) .on("transactionHash", console.log) .on("confirmation", console.log);

}

Transactionshash I got: 0x6ae235d08d2679ae1829d2ef28dcc400286130f359315c47e6e14ad719d8b8b1

If anyone has a working code example with ERC-20 Tokens, please help or show it. Thanks.

elisabeth0bangoura avatar Jul 17 '22 12:07 elisabeth0bangoura

Hi @elisabeth0bangoura

Looking at it everything seems to have worked fine the issue is because the account you sent from has insufficient DAI.

To get some DAI faucet follow this process after that you can try again

Go to "https://app.compound.finance/" connect metamask using rinkeby test network In supply section select DAI -> Faucet

FEEB31B6-F83A-4CB4-B560-2CD16B45D6C2

I just sent some test DAI to your wallet so you can use that to test..

So all you have to do now is change the token address to 0x5592EC0cfb4dbc12D3aB100b257153436a1f0FEa

iamnotstatic avatar Jul 18 '22 06:07 iamnotstatic

Hi everyone. bug Have you ever seen this issue?

apollo0102 avatar Feb 22 '23 20:02 apollo0102