6

I want to approve token spending on Uniswap for a token I don't own. Uniswap UI won't let me do that (instead it displays a gray out button "insufficient balance").

Seems the only option would be to manually approve the token using Etherscan.

Which Uniswap contract should I interact with? (v2) What are the required parameters and what is the uint for infinite approval?

2
  • You want to approve before getting the token? why not just do it once you have it? Commented Oct 5, 2020 at 6:54
  • Because i need to dump it as fast as possible once i have it. Commented Oct 5, 2020 at 7:13

1 Answer 1

10
  1. Get the pool address

Go to the Uniswap UI at https://app.uniswap.org/. Choose the token pair you want and then click the View pair analytics ↗. This will take you to a link like https://uniswap.info/pair/<poolAddress>. Note down poolAddress.

  1. Approve via Etherscan

Go to https://etherscan.io/token/<tokenAddress>#writeContract where tokenAddress is the one you want to approve. Go to the approve tab and now enter poolAddress + amount.

7
  • Thx @markus just a few questions: (1) I want to approve the token for swapping, but still need the pool address right? (2) What value should i give to amount should i fill for infinite approval? Commented Oct 5, 2020 at 7:31
  • 1
    @PmRivière (1) Yeah, what did you think? (2) Go for infinite sure. I think even the Uniswap UI does this. Commented Oct 5, 2020 at 7:53
  • 1
    Infinite would mean 2^256 - 1. Commented Oct 5, 2020 at 7:54
  • Just how do i key in 256^-1? it's a UINT256 expected. That would mean i just key in -1? Commented Oct 5, 2020 at 8:53
  • 1
    @PmRivière "115792089237316195423570985008687907853269984665640564039457584007913129639935" Commented Oct 5, 2020 at 21:13

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.