Internal JSON-RPC error on Remix

:computer: Environment
Remix

:memo:Details
Code compilations completes successfully, but when i try to deploy my contract, i get this error:

Internal JSON-RPC error. { “code”: -32000, “message”: “execution reverted” }

Metamask is set to BSC-TestNet correctly with 1.2 BNB balance, and i hard-coded PCS-Testnet router address in the code.

:1234: Code to reproduce
https://pastebin.com/raw/8BXg3Zip

FIXED
You tried to change ETH with BNB but it is not possible until you use Uniswap Interface

2 Likes

Thank you FreezyEx. Can you elaborate please? I was trying to implement a Cetik finding:
The X contract uses Pancakeswap for swapping and add liquidity to Pancakeswap pool, but naming it Uniswap. Function swapTokensForEth(uint256 tokenAmount) swaps X token for BNB instead of ETH.

You were trying to use things that don’t exist. If you go on pancake router you will se AddLiqudityETH not AddLiquidityBNB. So you were trying to do the impossible.