Hi guys,
question: in my contract, can I call pancake swap removeLiquidity function on behalf of the msg.sender ? seems like there is an issue with the allowance
Apr 9, 2022, 6:10 PM
user need to approve your contract to use LP tokens
then your contract can removeLiquidity on behalf of the user
Apr 9, 2022, 6:57 PM
Hi Teeway, yes it's what I did. Actually I did a test calling the removeLiquidityETH outside the contract and I get the same error.
Apr 9, 2022, 7:08 PM
you need to approve that also, unless you ar removing with permit
Apr 9, 2022, 7:28 PM
I did it but it still fails, I gues there is a mismatch with the pancake router address on testnet
Apr 9, 2022, 7:35 PM
i used it several times, router is okay
Apr 9, 2022, 7:36 PM
Yes I mean in my contract
Apr 9, 2022, 7:36 PM
you have the interface in your contract ?
Apr 9, 2022, 7:38 PM
yes
Apr 9, 2022, 7:40 PM
debug the tx in tenderly, best way to find out where its failing
Apr 9, 2022, 7:41 PM