# Router

## wETH

```solidity
// Returns address of the wETH contract.
function wETH() external view returns (address);
```

## factory

```solidity
// Returns address of the factory contract.
function factory() external view returns (address);
```

## addLiquidity

```solidity
// Adds (or creates) liquidity to pool.
    function addLiquidity(
        address tokenA,
        address tokenB,
        uint amountADesired,
        uint amountBDesired,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        uint feeType,
        bool stable
    ) external returns (uint amountA, uint amountB, uint liquidity);
```

## addLiquidityETH

```solidity
// Adds (or creates) liquidity to pool.
    function addLiquidityETH(
        address token,
        uint amountTokenDesired,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        uint feeType,
        bool stable
    ) external payable returns (uint amountToken, uint amountETH, uint liquidity);
```

## removeLiquidity

```solidity
// Removes liquidity from existing pool.
    function removeLiquidity(
        address tokenA,
        address tokenB,
        uint liquidity,
        uint amountAMin,
        uint amountBMin,
        address to,
        uint deadline,
        bool stable
    ) external returns (uint amountA, uint amountB);
```

## removeLiquidityETH

```solidity
// Removes liquidity from existing pool.
    function removeLiquidityETH(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool stable
    ) external returns (uint amountToken, uint amountETH);
```

## removeLiquidityETHSupportingFeeOnTransferTokens

```solidity
// Removes liquidity from existing pool for tokens with fee transfer.
    function removeLiquidityETHSupportingFeeOnTransferTokens(
        address token,
        uint liquidity,
        uint amountTokenMin,
        uint amountETHMin,
        address to,
        uint deadline,
        bool stable
    ) external returns (uint amountToken, uint amountETH);
```

## swapExactTokensForTokens

```solidity
// 
    function swapExactTokensForTokens(
        uint amountIn,
        uint amountOutMin,
        address[] calldata path,
        address to,
        uint deadline,
        bool[] calldata stable
    ) external returns (uint[] memory amounts);
```

## swapExactETHForTokens

```solidity
// 
    function swapExactETHForTokens(
            uint amountOutMin, 
            address[] calldata path, 
            address to, 
            uint deadline, 
            bool[] calldata stable
        ) external payable returns (uint[] memory amounts);
```

## swapExactTokensForETH

```solidity
// 
    function swapExactTokensForETH(
            uint amountIn, 
            uint amountOutMin,
            address[] calldata path, 
            address to, 
            uint deadline, 
            bool[] calldata stable
    ) external returns (uint[] memory amounts);
```

## swapExactETHForTokensSupportingFeeOnTransferTokens

```solidity
//
    function swapExactETHForTokensSupportingFeeOnTransferTokens(
                uint amountOutMin,
                address[] calldata path,
                address to,
                uint deadline,
                bool[] calldata stable
          ) external payable;
```

## swapExactTokensForETHSupportingFeeOnTransferTokens

```solidity
//
    function swapExactTokensForETHSupportingFeeOnTransferTokens(
              uint amountIn,
              uint amountOutMin,
              address[] calldata path,
              address to,
              uint deadline,
              bool[] calldata stable
          ) external;
```

## swapExactTokensForTokensSupportingFeeOnTransferTokens

```solidity
//
    function swapExactTokensForTokensSupportingFeeOnTransferTokens(
            uint amountIn,
            uint amountOutMin,
            address[] calldata path,
            address to,
            uint deadline,
            bool[] calldata stable
        ) external;
```

## quote

```solidity
// Gets reserve quotes
    function quote(uint amountA, uint reserveA, uint reserveB) 
            external pure returns (uint amountB);
```

## getAmountOut

```solidity
// Calculates the best price through both stable and normal pools
    function getAmountOut(
                uint amountIn, 
                uint tokenIn, 
                uint tokenOut
    ) external view returns (uint amountOut, bool stable, uint fee);

```

## getAmountsOutExpanded

```solidity
// Calculates the best prices for path. Returns amounts, pool types, and pool fees for route
    function getAmountsOutExpanded(
                uint amountIn, 
                address[] calldata path
    ) external view returns (uint[] memory amounts, bool[] memory stable, uint[] memory fees);

```

## getAmountsOut

```solidity
// Calculates price best on path and pool type (stable, normal)
    function getAmountsOut(
                uint amountIn, 
                address[] calldata path, 
                bool[] calldata stable
    ) external view returns (uint[] memory amounts);
```

## getPairInfo

```solidity
// Returns pair info
    function getPairInfo(
                    address[] calldata path, 
                    bool stable
    ) external view returns(address tokenA, address tokenB, address pair, uint reserveA, uint reserveB, uint fee)

```

## pairFor

```solidity
// Returns pair address
    function pairFor(address tokenA, address tokenB, bool stable)
      external view returns(address pair);

```

\
\
\ <br>
