0

I'm using this PCS clone on the testnet:

https://pancake.kiemtienonline360.com/#/swap

And I'm trying to understand how an elastic token works. I'm looking at Gravitoken (https://bscscan.com/address/0x1337ace33c2b3fc17d85f33dbd0ed73a896148b5#code) . So I deployed the token on the BSC TESTNET and set the Factory to: 0x6725F303b657a9451d8BA641348b6761A6CC7a17

​And the Router to: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1

Now, I can add liquidity pool on this clone of PCS and I can buy/sell the token. The problem is that when I call the rebase function, and for example I remove half of the total supply, the balance on all the user wallets is halved, but the amount of tokens inside the liquidity pool doesn't change. I see the smart contract call LP.sync() on the rebase function. But it doesn't work. Is this a problem with the testnet/PCS clone or should I set up something in a different way?

I changed these lines:

IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0xD99D1c33F9fC3444f8101754aBC46c52416550D1);

uniswapV2PairAddress = IUniswapV2Factory(0x6725F303b657a9451d8BA641348b6761A6CC7a17);

2 Answers 2

0

when I work with https://pancake.kiemtienonline360.com/#/swap

I use those addresses:

IUniswapV2Router02:0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3
IUniswapV2Factory:0xb7926c0430afb07aa7defde6da862ae0bde767bc

with this configuration I am able to reflect liquidity pools.

1
  • Thank you, I tried with these addresses but I still got an error when I try to buy/sell my token on the testnet pancakeswap. Looks like the problem are the methods swapExactTokensForETHSupportingFeeOnTransferTokens() and swapExactETHForTokensSupportingFeeOnTransferTokens(). Any workaround for that?
    – Nicola
    Dec 8, 2021 at 13:54
0

According to the AMM on testnet link at the PCS clone URL you posted (https://amm.kiemtienonline360.com/), the router address you should be using is:

Router Address: 0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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