is there any way to debug these type of tx errors that doesn't have a hash value?

Dec 20, 2021, 9:53 AM
If there is no transaction hash, there is no transaction :)
Dec 20, 2021, 9:59 AM
But i am sending a transaction to my contract
but i am not sure
Dec 20, 2021, 10:07 AM
Then there would be transaction hash
Dec 20, 2021, 10:07 AM
the thing is that the exact same code works in testnet with bnb and dai token
i don't understand why its not working in mainnet
i see the token i am using is extending the transferFrom function
i can still use IERC20(token).transferFrom(from, to, amountIn) to transfer Right?
does anyone know why this is not working?
Dec 20, 2021, 1:02 PM
There could be many reasons: Out of gas, wrong input, no enough balance. The most common one is not enough allowance (forgetting to approve tokens from => to)
Dec 20, 2021, 1:05 PM
yeah, you should call approve function to call transfer.
Dec 20, 2021, 1:06 PM
I think it will show the error if it was any one of them. But instead i am getting the error UNPREDICTABLE_GAS_LIMIT and there's no tx hash.
I am already approving my contract for the token
const approvingAmt = "100000000000000000000000000000000";
const allowance = await .inputTokenContract.allowance(
myWallet,
contractAddress
);
const approve = await inputTokenContract.approve(
contractAddress,
approvingAmt
);
Dec 20, 2021, 1:13 PM
hmm I see. I've never faced that error before but this could help: https://github.com/ethers-io/ethers.js/issues/1232
Dec 20, 2021, 1:14 PM
what is contractAddress there?
Dec 20, 2021, 1:14 PM
its my contract
its working on testnet
Dec 20, 2021, 1:15 PM
not working in mainnet?
Dec 20, 2021, 1:15 PM
nope
have only tried with one token
gonna try it with another token now
Dec 20, 2021, 1:16 PM
good idea
do you know tenderly?
you can debug on tenderly using transaction hash
so you will see where is error on transaction using tenderly.
Dec 20, 2021, 1:18 PM
Yeah tenderly is good. but can't use it since there was no tx hash.
Dec 20, 2021, 1:21 PM
what you mean? Did not you got transaction hash from metamask?
Dec 20, 2021, 1:22 PM
No, the error seems to happen before sending the transaction
according to this, of course
Have you tried changing your node provider?
Dec 20, 2021, 1:25 PM
no
there's no tx log or hash
i am wondering can you guys test token transfers with 0.001 wbnb or is that too low?
man i would go bankrupt before making this contract work
Dec 20, 2021, 1:55 PM

© 2024 Draquery.com All rights reserved.