Hi, I'd like to open up with my intention that lead me to need a localhost pancakeswap:
I am cloning Safemoon contract to tinker with it to learn how it works. Functions inside of 'Safemoon' require the use of a DEX like pancakeswap because it adds to liquidity on every transaction.
I am aware that testnet pancakeswap forks exist, but I was limited to 1BNB/24 hours from the testnet faucet, and I need a lot of BNB to test this contract extensively -- so I decided to do a local fork using ganache-cli, so I can give myself BNB using the internal accounts.
I began by deploying WBNB, CakeToken, Factory, and RouterV2 locally using brownie. Then I forked 'pancakeswap-frontend-develop' from their github and ran a local version. I changed the addresses inside the PS frontend files for my newly deployed WBNB, CakeToken, Factory, and RouterV2 respective ones - as well as changing some settings so it connects to my local host.
When I boot up the front end on my local host, I am able for it to detect my wallet where I minted myself CakeToken and also gave myself some BNB. I start by creating a new liquidity pool for the pair BNB/CAKE. Metamask approves this and I am able to see the transaction go through. Then when I hit supply, I am able to approve the 'addLiquidityETH' function and I see it go through. I see the events being emitted like the pair being created from the factory when I look at my localhost block explorer.
Now when I go to SWAP BNB for CAKE using the interface, it says there is insufficient liquidity -- and when I go back to create the BNB/CAKE again, it tells me this is the first time this pool is being created. It's like the liquidity pool was never created.
Does anyone know how I can proceed from here? Am I missing additional pancakeswap smart contracts that I need to deploy in order to get a "localhost pancakeswap fork"?