0

We are tryting to make pancakeswap to work on bsc testnet. What we have done is as follows.

We have renamed the cake token to another token e.g BarToken with Symbol BARS We have added liquidity using Router V2 and Factory V2 and we have added liquidity using pancakeswap swap interface and everything seems to be working fine on this side. We renamed the Lp tokens on factory contract.

Than we fork the pancake-swap frontend and deployed the contracts for.

  • SyrupBar (provided token address when deploying)
  • MasterChef (provided srypbar address and token address and change the ownership of syrupbar and caketoken)
  • Souchef
  • LP pair contract generated by factory after adding liquidity using pancakeswap-frontend core.

We have added these contracts in config files for contracts, pools, farms and tokens. We also updated wbnb bsc testnet contract.

The problem is that we are not able to approve pool and not able to enable farm which has pair BARS-BNB(we double check the addresses). The wallet address is also the contract owners for all these contract.

After some debugging we find that the allownaces are getting undefined for pools and farms.

Did we miss anything?

1
  • Any possibility of getting addresses to play around with? I've been looking for a test bed for a bit.
    – Snapple
    May 17 at 18:48
1

Sorry to add an answer but i can't comment.

I am also looking to add a token/BNB or token/WBNB pair in testnet but it doesn't work. Tried using https://testnet.bscscan.com/address/0xD99D1c33F9fC3444f8101754aBC46c52416550D1#writeContract, remix, truffle, web3, and none allow it.

I am able to add a token1/token2 pair but doing the BNB or WBNB doesn't work.

Ive tried using ganache with bsc as well and same thing. I think they currently don't have tthis set up because everyone is asking but i haven't yet seen an answer and I've read about every post anywhere

If you find the solution, please let me know and i will do the same.

1
  • Hi! We get that it's tough before you're able to comment - we recommend that if this is different enough to warrant its own question, that you move it to its own question.
    – Linum Labs
    May 14 at 7:33
0

There is a setting in sdk library to define all, INIT_HASH, FACTORY, and WETH addresses,

WETH stands for WBNB on BNC chain. at node_modules/pancakeswap-libs/sdk/dist edit both constants.d.ts and sdk-v2.cjs.development.js

4
  • We have already added it thats why we are able to add liquidity. May 13 at 13:25
  • Hey @CreativeDip, were you able to make it work? May 13 at 17:50
  • whats your weth address you have on your sdkX.development.js ?
    – rina
    May 14 at 0:01
  • ah ok i see, i tried to reproduce your problem and indeed my LP tokens are not seen if they come from BNB pair, also the BEP20 pairs LP's can be seen from metamask but aren't getting really spend.. so it isnt really working even for token/token, for now i am missing of Multicall and vault contracts, im gonna copy and deploy them from bscan and i will return if i fix this
    – rina
    May 14 at 4:12
0

I Managed to make both farms, pools to work on the testnet, i upload a picture that will help you understand the structure and the relation between the web interface and the contracts, there are however plenty of contracts that are missing from the github repo and you will have manually to copy from the bscscan and modify your migration scripts accordingly to the constructors of each.

enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.