Hello everyone,
First of all I'd like to thank you for providing this opportunity. Maybe there's someone who will help me, and it wouldn't be possible without this platform!
I've merged various forks from popular contracts, most notably SafeMoon, and launched my token through DXSale.
The Token has 4 basic functions: On every transaction, 5% is burnt, 5% is redistributed, and 5% is added to LP. Additionally, the maximum transaction is capped at 5000 Tokens (0.5% of supply)
There is an issue with the 5% going to the PancakeSwap LP, it's not working for some reason, and I'm not sure why.
Environment
Remix
Details
I followed DXSale's guide on how to launch SafeMoon forks on their platform, which is this:
If you are yet another copy of SafeMoon please ensure that you do the following to finalize:
- setLiquidityFeePercent to 0
- setMaxTxPercent to 100
- setSwapAndLiquifyEnabled false
- setTaxFeePercent 0
- Learn to read and understand your own code
- Test your code on the test networks provided
- Call finalize
- setSwapAndLiquifyEnabled true
- setLiquidityFeePercent (To your lp tax fee amount)
- setTaxFeePercent (To your reflect fee amount)
The launch was successful (the 2nd time around) but I had to disable setSwapAndLiquifyEnabled. This means the 5% to LP is not activated.
I don't have all the exact same functions but they are equivalent in what they do, simple variables changing the fee's values, or the max transaction limit. The one that I do have in common is setSwapAndLiquifyEnabled, which also just changes a boolean from true to false. The part of the code that is relevant to the LP is an exact match with many other popular contracts.
The problem I'm facing is that as soon as setSwapAndLiquifyEnabled is set to true, no one can sell their tokens anymore.
PanCakeSwap error: The transaction cannot succeed due to error: TransferHelper: TRANSFER_FROM_FAILED. This is probably an issue with one of the tokens you are swapping.
I presume this is because of an error in the code, but I can't understand how there's an error if it's exactly the same portion of code as other popular tokens, and as such, I believe it's execution related.
You can see all the current variable values here
Code to reproduce
Any help is welcome. Thank you so much.