I cant deploy this source code myself on BSC even though the creator can, I can only deploy it onto the ETH testnet, not BSC.

Here is the original contract: https://bscscan.com/address/0xB0B924C4a31b7d4581a7F78F57ceE1E65736Be1D#code

When I try I get this error:

Gas estimation failed Gas estimation Errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending? Internal JSON-RPC error. { "code": -32000, "message": "execution reverted" }

Also, why do I need to have a UniSwap Router? I thought that Uniswap was for ETH only?

Thanks :)


If you want to deploy it to the BSC mainnet, you must change the _uniswapV2Router address to the router on BSC, which has the following values:

BSC Mainnet V2 (pancakeswap) router: 0x10ED43C718714eb63d5aA57B78B54704E256024E
BSC Testnet                      router: 0xD99D1c33F9fC3444f8101754aBC46c52416550D1
BSC Testnet (pancakeswap test)   router: 0x9Ac64Cc6e4415144C455BD8E4837Fea55603e5c3

For the pancakeswap testnet you can use https://pancake.kiemtienonline360.com as the AMM


Send the solidity code you try to deploy.

If you remove the UniswapRouter interface, it is normal that you can't deploy your contract.

First, your contract need to have the UniswapRouter included because it need to "know" which methods it contains to know methods prototypes.

Secondly, even if you don't use Uniswap, you can still need the Uniswap interfaces because majority of dexs are basically Uniswap forks, even on the BSC so these contracts will act like the Uniswap's contracts.

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.