I'm coding a shitcoin and I'd like 2% of each transaction to be used to add LP. What I planned to do is
1. Transfer 2% to the token contract
2. Swap half of it for BUSD (problem is here)
3. Add liquidity
The problem is in point #2, when I try to swap half for BUSD I hit the Pancake: INVALID_TO error (cf. screenshot). The swap function doesn't allow to do a swap with a recipient equal to the token address.
Any idea?
Jan 26, 2022, 8:01 AM
Had same issue before on a shittoken I coded
Do a double swap. Token to bnb, bnb to busd
Jan 26, 2022, 9:03 AM
That's exactly what I ended up doing, very inelegant but it works
Thanks bro ;)
Jan 26, 2022, 9:05 AM
you can do a triple path token > bnb > busd in the same function
Jan 26, 2022, 9:22 AM
Not gonna work as there is no liq on token-bnb pair
Does anyone know the name of tool which converts solidity workflow into flowchart?
When I used, there was no plugin support
Thanks @FreezyDev
Jan 26, 2022, 10:58 AM