Can't make an ERC20 Transaction Error: call revert exception!!!
- 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?
Hi @elisabeth0bangoura,
Can we see your code sample to have a better view
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 ] (
@iamnotstatic The same Error happens when I do this:
const txHash = await account .send("addressTo", 0.200, { type: "ERC20", Name: "DAI", <---- })
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
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: @.***>
Yeah, it should but notwithstanding you should verify.
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: @.***>
I can help you pm me, email in my profile
@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.
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

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
Hi everyone.
Have you ever seen this issue?