I want to create an ERC20 token like safemoon in which I want to add my custom tax 10% on each trade in pancake swap and this tax auto added in liquidity and liquidity also locked for 3 year. Is there any way to achieve this ?
Yeah I am sure you can achieve your goals. If you are going to do it yourself break the project into little pieces. Start by creating an erc-20 (hint: openzeppelin contract wizard) then try to add a tax, after that learn how to lock it up (maybe with block.timestamp)
@MetalGearSolidity I deployed a token on bscscan(testnet) and created an LP in pancake(testing). but when I try to swap tokens for BNB it is showing an error.
I think this error is related to isExcludedFromFee bcoz when I make user isExcludedFromFee(true) then it's working fine.
The issue is in the router address you used.
If you want to test using the DAPP you linked you need to set this as router address:
@FreezyEx Now its working thanks