Can't add liquidity on PancakeSwap with burnable ERC20 token

@Yoshiko can we not add liquidity in pancakeswap if we use our own addresses of factory and router in BSC testnet?

I’m not sure I understand what you are asking.

You can manually add liquidity to Pancake Swap following the instructions I outlined.
You will need to change the BSC Router/Factory address depending on if you are in Live or Test.

LIVE BSC Router Address: 0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F
LIVE BSC Factory Address:0xfa249Caa1D16f75fa159F7DFBAc0cC5EaB48CeFf (?, not sure on this)

TEST BSC Router Address: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1
TEST BSC Factory Address: 0x6725F303b657a9451d8BA641348b6761A6CC7a17

1 Like

Actually when I try to add liquidity on testnet using pancakeswap’s own router and factory address I am successful and get LP tokens in return. But if I try to do the same with the router and factory address generated by my code I always get hijacked stack error. This is the link to my question Unable to add liquidity to pancakeswap can you have a look please?

But if I try to do the same with the router and factory address generated by my code

What are these addresses? Please make a new topic for a new question. This is probably a different error in that your contract is making erroneous addresses.

I managed to add liquidity in BSC Testnet using your guide, but trying to use the pancakeswap gui in testnet to try a trade shows me there’s no liquidity.

2021-04-25_180437

This is the transaction to add liquidity: https://testnet.bscscan.com/tx/0xcf71e0697a8158507badf439281b20d4b34e5dbb0f952425756142de20932e3e
And this is the cake-LP: https://testnet.bscscan.com/token/0xb78bc6fb66234c5969dd5cf643eea9b8bd24233a

What’s weirder is that I tried to add liquidity using the GUI on pancake too, the transaction was accepted but it didn’t create any liquidity, it just ate 5 bnb: https://testnet.bscscan.com/tx/0x4c9bb166dba3c15486cd1bf67b6acfd89a264fe3980fbae7d4749e07967a3c33

I added liquidity like this:

And it sent my bnb there: 0x10ED43C718714eb63d5aA57B78B54704E256024E and that’s it.

I don’t know if there’s problems with Pancake at this point and that’s it, since when I first posted in this thread I couldn’t even add liquidity like you told me to.

1 Like

@LSparkzwz please have a look at my question as well Why cant I add liquidity over bsc testnet using my own router and factory address - #3 by Tsushima_Yoshiko

Thank you, now everything works well.

3 Likes

I don’t know if there’s problems with Pancake at this point and that’s it, since when I first posted in this thread I couldn’t even add liquidity like you told me to.

I think this is it, I wasn’t aware that using the GUI on PancakeSwap for the testnet was up yet.

@LSparkzwz So does the GUI work for PancakeSwap on the testnet?

Glad to hear everything works though, what was the problem?

Remember that Pancakeswap is migrating to Router V2 so don’t forget to update router address

1 Like

How did you succeed?

1 Like

We have problem with our token and we cannot swap (buy,sell).
Can you check what is the problem ? Thanks

Hi, i am rather new to this. What is the next step to do after creating a LP pair(BNB/MyToken). Do i need to just hold this or send it the contract(or a LP contract)? Any tips would be great!

I’m following the tutorial, but in step 2 I have an error “ALERT: Transaction Error. Exception thrown in contract code.” in metamask

Can someone help me? @LSparkzwz

Hi, welcome! :wave:

If you want to provide liquidity, then you can add liquidity.
If you want to use the LP token to stake, you can stake your LP token in the staking contract.
If you want to buy/sell your token, you can just swap to get what you want.

Hi, welcome! :wave:

Which function are you trying to call, it seems like there is something wrong with your function parameters.

Hi,
I’m trying to add liquidity
this is my contract https://testnet.bscscan.com/token/0xa49958021d877e467fef3fa3d960bad8b39f91dc

step 1 it worked

image

1 Like

Does it work with the actual PancakeSwap test router?
The test router is not the address you approved.

If you’re trying to build a token.
First test that it works on the actual PancakeSwap.
Then try to test it on your modified PancakeSwap.

If it works on the actual PancakeSwap, the problem isn’t your token, but your modified PancakeSwap.

I can’t do this step! just the step 2.
Could you add LP in testnet?

Hey folks, I’ve done all the steps above as outlined by @Yoshiko (thank you so much!) and was able to add liquidity in testnet. To do so, I needed to setSwapAndLiquifyEnabled = false, add liquidity, then setSwapAndLiquifyEnabled = true afterwards.

I was able to successfully buy the token via pancake testnet contract, but the problem I’m having now is selling them. I can’t figure out why I’m getting the following:
TX - TRANSFER_FROM_FAILED

Here’s my token, it’s a safemoon copy: Token

Any help would be greatly appreciated!