0

recently I made a swap from ETH to WETH and immediately after that tried to grant another contract approval to spend my WETH. The TX immediately failed after it was created and was never submitted. Why is this? My guess is that I didn't wait for enough block confirmations before making the spend approval TX, but if this is the case how many block confirmations should a wait for next time to avoid this in the future? Is is different for each ERC-20 token approval?

Thank you for helping me understand this better!

Edit: I tried looking for the failed TXs in etherscan, but I can't find them? Weird. This occurred when I tried to approve UDST and WETH with the sudoswap.xyz contract.

1
  • Do you have the failed transaction hash? Why did it fail? Calling approve only requires ether to pay the transaction.
    – Ismael
    Commented Dec 8, 2021 at 20:19

1 Answer 1

0

nope, there is no requirement to "wait for enough block confirmations" before.

without further information(like a txs hash, etc) there can be multiple reasons for this:

  1. you're calling the incorrect contract
  2. txs out of gas
  3. etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.