title: Error in creating uniswap pair for smart contract
body: <p>I am getting the below error on calling function setRouterAddress with router address 0xD99D1c33F9fC3444f8101754aBC46c52416550D1 in testnet.</p>
  <p><strong>Gas estimation failed error</strong>
  Gas estimation errored with the following message (see below). The transaction execution will likely fail. Do you want to force sending?
  execution reverted</p>
  <p>this is message is coming for this line of code in the below function. <strong>IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());</strong></p>
  <p><strong>declarations:</strong>
  IUniswapV2Router02 public  unswapV2Router;
  address public unswapV2Pair;</p>
  <p><strong>Function:</strong></p>
  <pre><code>    function setRouterAddress(address newRouter) external onlyOwner() returns(address, address){
  
          IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(newRouter);
          // Create a uniswap pair for this new token
          uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH());
          // set the rest of the contract variables
          uniswapV2Router = _uniswapV2Router;
          
          return (newRouter, uniswapV2Pair);
      }
  </code></pre>
  <p>Could someone guide what is the problem ?</p>