I forked SAFEMOON a few times but I’m having the same issue over and over. FYI I have the PancakeSwap Router v2 hardcoded into the contract the the problem should not stem from that.
Essentially, when I add LP, people can trade the token freely and everything works. However when I try to remove from the LP (or if anyone tries to add more to the LP), the token stops working. This means nobody can withdraw LP, or trade the token. LP withdrawal gets stuck as the “Confirm” button on the final stage doesn’t do anything, and swaps are met with:
“The transaction cannot succeed due to error: TransferHelper: TRANSFER_FROM_FAILED. This is probably an issue with one of the tokens you are swapping.”
After calling setSwapAndLiquify(false) on the contract, it is possible to withdraw from the LP and the token is able to be swapped (however, this literally removes the automatic 5% LP tax which is counterproductive). Setting it to true again throws the same errors as previously.
I’ve tried numerous contracts with different size LP pools etc, but the error is the same constantly.
Me removing LP:
My friend adding LP:
I know there are other threads with a similar issue, but I honestly cannot figure out why this may be happening and can’t run the risk of someone else adding liquidity to the token and stopping it from working.
Thank you in advance