1

So one of the most annoying things for me is having to Approve before calling Swap or Deposit.

I would love there to be a proxy contract which just calls Approve and Swap/Deposit in the same function.

Are there any existing contracts that implement this already?

doctopus
  • 315
  • 2
  • 9
  • As said by other it is not possible with non-contract wallet. But it should be possible if the wallet is a contract. – Ismael May 13 '21 at 04:05

1 Answers1

1

It cannot be done as far as I know.

approve() has to be called on the token contract from the address holding the tokens. Therefore, a contract could not call the approve function on behalf of your address.

Undead8
  • 3,570
  • 9
  • 28