pancake-swap-interface-v1
pancake-swap-interface-v1 copied to clipboard
Can't provide initial liquidity on Bscscan testnet
I have created a token on the bsc testnet, and have also created a liquidity pool. I am trying to provide initial liquidity but an error is shown whenever I try to do so.
The error message is below.
code: -32603, message: "Internal JSON-RPC error." data: { code: 32000, message: "gas required exceeds allowance (29885420) or always failing transaction" }
I have already called the 'initialise' method with the two tokens shown below, and have tried providing liquidity based on those two tokens, am I missing out on some steps?
I am using the pancake-swap-interface https://github.com/pancakeswap/pancake-swap-interface
For the tokens, I copied the token from https://github.com/goosedefi/goose-contracts/blob/master/contracts/EggToken.sol
My token address: 0xA6dE8E037201c6Ff9ff58e7fB72fE1Dbd15D1888 My psuedo BUSD address (copied from real BUSD): 0xA9bcCacD1D3f2EE7CA525f59c779F8c716965978 My LP token address: 0xb513219b46307eDDcaeFd1Aac99EB16394746B28
Thank you all! Also, I'm new to blockchain development hence if there are any resources on how to properly create a yield farming token, that would be great too, thanks all!
Right, i have the same problem. Do you have pancakeswap on bsc testnet?
Same problem here. Any thoughts?
How did you deployed the LP contract on the Testnet, from where did you get the source code?
I got the same problem, so I tried to clone pancake-swap-interface and adapt to new router address + abi, then it's worked.
I have same issue but I've also replaces router and factory contracts + INIT_HASH_CODE but still getting the error above you can check it here https://swap.extraffix.com
You don't need to replace init_code_hash, just update the router, weth and factory address. Make sure your changes to be reflected. Update them in the pancakeswap-libs/sdk
You don't need to replace init_code_hash, just update the router, weth and factory address. Make sure your changes to be reflected. Update them in the pancakeswap-libs/sdk
Why do I need another copy of WETH? I see no code inside it depending on router or factory? do you mean all of them should be deployed on same owner address?
I got the same problem, so I tried to clone pancake-swap-interface and adapt to new router address + abi, then it's worked.
What do you mean by 'router address + abi' I mean what abi data have you updated? I tried to update router and factory
Same problem here.
"Update them in the pancakeswap-libs/sdk" >> As I said before. You just need clone this sdk, replace these addresses, then publish to your npm, replace "pancakeswap-libs/sdk" package in pancake-swap-interface by your package that you just pushed.
PancakeRouter: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1 WETH: 0xae13d989dac2f0debff460ac112a837c89baa7cd Factory: 0x6725f303b657a9451d8ba641348b6761a6cc7a17
Well. I did as you said
copied old pancake front (now it is updated with some migration) redeployed own factory router and weth replaced in pancake front copy ROUTER and FACTORY but I didn't find where i Can replace WET but still get that error (see on attached picture)
What is left to do?
On Sun, Apr 25, 2021 at 7:08 PM Phu Nguyen @.***> wrote:
"Update them in the pancakeswap-libs/sdk" >> As I said before. You just need clone this sdk, replace these addresses, then publish to your npm, replace "pancakeswap-libs/sdk" package in pancake-swap-interface by your package that you just pushed.
PancakeRouter: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1 WETH: 0xae13d989dac2f0debff460ac112a837c89baa7cd Factory: 0x6725f303b657a9451d8ba641348b6761a6cc7a17
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pancakeswap/pancake-swap-interface-v1/issues/304#issuecomment-826348352, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQDOVSPHAUCEVI3H3AAFQDTKQ467ANCNFSM4ZYM75QQ .
"Update them in the pancakeswap-libs/sdk" >> As I said before. You just need clone this sdk, replace these addresses, then publish to your npm, replace "pancakeswap-libs/sdk" package in pancake-swap-interface by your package that you just pushed.
PancakeRouter: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1 WETH: 0xae13d989dac2f0debff460ac112a837c89baa7cd Factory: 0x6725f303b657a9451d8ba641348b6761a6cc7a17
and yes a replaced it in pancakeswap-libs/sdk (FACTORY) and ROUTE in front part
Mine Are ROuter: 0xDDb822FF1e75444b9cabCB1bB643F7Ab25ebeaD7 WETH: 0xBB10034EC64C4Cd2F5DcA63c94a64d966E33A10F Factory: 0x6Fe6392C248595f73f3271218a3610428604Bd46
But I didn't find where to replace WETH because it is passed to router on deployment so it is already there.
"Update them in the pancakeswap-libs/sdk" >> As I said before. You just need clone this sdk, replace these addresses, then publish to your npm, replace "pancakeswap-libs/sdk" package in pancake-swap-interface by your package that you just pushed.
PancakeRouter: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1 WETH: 0xae13d989dac2f0debff460ac112a837c89baa7cd Factory: 0x6725f303b657a9451d8ba641348b6761a6cc7a17
Can we have a talk somewhere else? telegram or email? mine is [email protected]
I changed tetstnet WETH constract address here but it didn't help (@pancakeswap-libs/sdk/dist/sdk.cjs.development.js etc) var WETH = (_WETH = {}, _WETH[exports.ChainId.MAINNET] = /#PURE/new Token(exports.ChainId.MAINNET, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'WBNB', 'Wrapped BNB'), _WETH[exports.ChainId.BSCTESTNET] = /#PURE/new Token(exports.ChainId.BSCTESTNET, '0xBB10034EC64C4Cd2F5DcA63c94a64d966E33A10F', 18, 'WBNB', 'Wrapped BNB'), _WETH);
Do you have telegram id , Can we discuss the issue - It appears to be that we are having the same problem - Help is appreciated!
Same problem here. Any thoughts?
Is this resolved now? We are facing the similar problem!
ROuter: 0xDDb822FF1e75444b9cabCB1bB643F7Ab25ebeaD7
@H1l4nd0r are you sure this is PancakeRouter address on bsc testnet? https://testnet.bscscan.com/token/0xDDb822FF1e75444b9cabCB1bB643F7Ab25ebeaD7 ??
ROuter: 0xDDb822FF1e75444b9cabCB1bB643F7Ab25ebeaD7
@H1l4nd0r are you sure this is PancakeRouter address on bsc testnet? https://testnet.bscscan.com/token/0xDDb822FF1e75444b9cabCB1bB643F7Ab25ebeaD7 ??
Oh sorry I misspelled the address The right one is 0x6EF53411545BeC56998AeE35F39406472ec2FeD0
Do you have telegram id , Can we discuss the issue - It appears to be that we are having the same problem - Help is appreciated!
yeah @h1l4nd0r
yeah my telegram @devsolidity
I got the same problem, so I tried to clone pancake-swap-interface and adapt to new router address + abi, then it's worked.
where did you update the abi?
Hi, since the pancakeswap router upgraded to V2, below is summary what I did to clone it on testnet:
- Deploy PancakeFactoryV2.sol contract, update feeTo and feeToSetter address
- Copy created INIT_CODE_PAIR_HASH and update to "library PancakeLibrary" of PancakeRouterV2.sol
- Deploy PancakeRouterV2 contract with new Factory address and WETH address (0xae13d989dac2f0debff460ac112a837c89baa7cd)
- Clone pancakeswap-libs/sdk and replace WETH, INIT_CODE_HASH to new address
- Clone pancake-swap-interface and replace router, factory address
- That's it. I checked the PancakeRouterV2 contract and see that they just update the function code, there is no any new function, so we don't need to update the ABI. The old ABI still working as normal.
Hi, since the pancakeswap router upgraded to V2, below is sumary what I did to clone it on testnet:
- Deploy PancakeFactoryV2.sol contract, update feeTo and feeToSetter address
- Copy created INIT_CODE_PAIR_HASH and update to "library PancakeLibrary" of PancakeRouterV2.sol
- Deploy PancakeRouterV2 contract with new Factory address and WETH address (0xae13d989dac2f0debff460ac112a837c89baa7cd)
- Clone pancakeswap-libs/sdk and replace WETH, INIT_CODE_HASH to new address
- Clone pancake-swap-interface and replace router, factory address
- That's it. I checked the PancakeRouterV2 contract and see that they just update the function code, there is no any new function, so we don't need to update the ABI. The old ABI still working as normal.
Were you able to add initial liquidity successfully afterwards?
Yes, add initial liquidity, swap, remove,... Everything works well
Yes, add initial liquidity, swap, remove,... Everything works well
And you used pancakeswap-sdk-v2 right? or the old one
@nguyenphu27 which git branch can use to on test network?
Hi, since the pancakeswap router upgraded to V2, below is summary what I did to clone it on testnet:
- Deploy PancakeFactoryV2.sol contract, update feeTo and feeToSetter address
- Copy created INIT_CODE_PAIR_HASH and update to "library PancakeLibrary" of PancakeRouterV2.sol
- Deploy PancakeRouterV2 contract with new Factory address and WETH address (0xae13d989dac2f0debff460ac112a837c89baa7cd)
- Clone pancakeswap-libs/sdk and replace WETH, INIT_CODE_HASH to new address
- Clone pancake-swap-interface and replace router, factory address
- That's it. I checked the PancakeRouterV2 contract and see that they just update the function code, there is no any new function, so we don't need to update the ABI. The old ABI still working as normal.
Can you share repository with this changes? 🙏
I have same issue but I've also replaces router and factory contracts + INIT_HASH_CODE but still getting the error above you can check it here https://swap.extraffix.com
It is saying me you cannot add liqduity in v1, please tell me how you do this.
Hi, since the pancakeswap router upgraded to V2, below is summary what I did to clone it on testnet:
- Deploy PancakeFactoryV2.sol contract, update feeTo and feeToSetter address
- Copy created INIT_CODE_PAIR_HASH and update to "library PancakeLibrary" of PancakeRouterV2.sol
- Deploy PancakeRouterV2 contract with new Factory address and WETH address (0xae13d989dac2f0debff460ac112a837c89baa7cd)
- Clone pancakeswap-libs/sdk and replace WETH, INIT_CODE_HASH to new address
- Clone pancake-swap-interface and replace router, factory address
- That's it. I checked the PancakeRouterV2 contract and see that they just update the function code, there is no any new function, so we don't need to update the ABI. The old ABI still working as normal.
You point here INIT_CODE_PAIR_HASH in pt2 and INIT_CODE_HASH in pt4 INIT_CODE_PAIR_HASH is from factory contract but where is from INIT_CODE_HASH?