? Pancake Swap Exchange on BSC testnet
Live instance working against
This router was deployed by PancakeSwap and published on their twitter, for other options with more liquidity see Testnet Routers
V2 SDK for the BSC testnet
Since there isn’t an official PancakeSwap on testnet and the v2 frontend swap interface code isn’t published on the PancakeSwap github I decided to adjust
pancake-swap-interface-v1 for v2 routers on the BSC testnet as per this comment on issue #365.
This fork requires a fork of
cd3d-dex-libs-sdk, instructions and code can at https://github.com/ibhagwan/pancakeswap-sdk-v2.
Step 1: Build
❯ git clone https://github.com/pancakeswap/pancakeswap-sdk-v2
- Modify the testnet
WBNBat the end of
[ChainId.BSCTESTNET]: new Token( ChainId.BSCTESTNET, '0xae13d989dac2f0debff460ac112a837c89baa7cd', 18, 'WBNB', 'Wrapped BNB' )
Note: if you’d like to use the default testnet router
0xD99D1c33F9fC3444f8101754aBC46c52416550D1you can skip the editing and
git clone https://github.com/ibhagwan/pancakeswap-sdk-v2.gitinstead.
❯ yarn ❯ npm run build
Clone and branch to the commit before V2 changes:
❯ git clone https://github.com/pancakeswap/pancake-swap-interface-v1 ❯ git branch pancake_v2 0257017 ❯ git checkout pancake_v2
.env with the below contents:
Edit the tokens you’d like to appear in the UI in
src/constants/token/pancakeswap.json (change the token
address and set
chainId to 97)
Search the entire project for
'cd3d-dex-libs-sdk' and replace with
I do this with vim, search the entire project with
fzf|rginto a quickfix list and use
❯ yarn ❯ npm install ../pancakeswap-sdk-v2 ❯ rm -rf ./node_modules/cd3d-dex-libs-sdk ❯ yarn start Starting the development server... Compiled successfully! You can now view @pancakeswap/interface in the browser. Local: http://localhost:3000 On Your Network: http://10.10.10.9:3000 Note that the development build is not optimized. To create a production build, use yarn build.
PancaeSwap V2, option #1 (default)
This router was deployed by PancakeSwap and published on their twitter
PancaeSwap V2, option #2
This router was published by kiemtienonline360.com and can be accessed through https://pancake.kiemtienonline360.com