# ⚙️ Integrate with MonoX

The MonoX smart contracts *will* exist on the Ethereum blockchain. Until that time, there are a bunch of test networks are available for you to integrate and complete your tests. These networks are:

* Ethereum Mainnet,
* Polygon Mainnet,
* Kovan Testnet,
* Mumbai Test (Polygon)

## Contracts

In order to complete an integration with the below contracts, you will need to have ABI ([Application Binary Interface](https://en.wikipedia.org/wiki/Application_binary_interface#:~:text=In%20computer%20software%2C%20an%20application,between%20two%20binary%20program%20modules.\&text=A%20common%20aspect%20of%20an,are%20the%20x86%20calling%20conventions.)).&#x20;

#### How to get ABI of a contract?

![Visit a link below, navigate into the Contract tab,  then scroll until you see Contract ABI.](/files/-MkMDJblAeRLZtgf0914)

### Contracts on Ethereum Mainnet

VCASH address: [0x532D7ebE4556216490c9d03460214b58e4933454](https://etherscan.io/address/0x532D7ebE4556216490c9d03460214b58e4933454)&#x20;

MonoXPool address: [0x59653E37F8c491C3Be36e5DD4D503Ca32B5ab2f4](https://etherscan.io/address/0x59653E37F8c491C3Be36e5DD4D503Ca32B5ab2f4)&#x20;

Monoswap address: [0xC36a7887786389405EA8DA0B87602Ae3902B88A1](https://etherscan.io/address/0xC36a7887786389405EA8DA0B87602Ae3902B88A1)&#x20;

MONO address: [0x2920f7d6134f4669343e70122cA9b8f19Ef8fa5D](https://etherscan.io/token/0x2920f7d6134f4669343e70122cA9b8f19Ef8fa5D)

### Contracts on Polygon Mainnet

VCASH address: [0x7621eE0CE0F686b88dD70551B05F90dd3C04d6e9](https://polygonscan.com/address/0x7621eE0CE0F686b88dD70551B05F90dd3C04d6e9)&#x20;

MonoXPool address: [0x3826367A5563eCE9C164eFf9701146d96cC70AD9](https://polygonscan.com/address/0x3826367A5563eCE9C164eFf9701146d96cC70AD9)&#x20;

Monoswap address: [0xBD5ca837C759B429398dc55b643f1Dd8d0D72CbD](https://polygonscan.com/address/0xBD5ca837C759B429398dc55b643f1Dd8d0D72CbD)

### Contract on Kovan Test Network

VCASH address: [`0x35363a7aceFc54e85FB21B0B4a89e336eB7C065A`](https://kovan.etherscan.io/address/0x35363a7aceFc54e85FB21B0B4a89e336eB7C065A)

MonoXPool address: [`0xA22710AA406f9302e68bF5d1d0859dA6d7A6A93c`](https://kovan.etherscan.io/address/0xA22710AA406f9302e68bF5d1d0859dA6d7A6A93c)

Monoswap address: [`0xE8141055b060BA9f7C75c6D5c904D4A7Fc97A66b`](https://kovan.etherscan.io/address/0xE8141055b060BA9f7C75c6D5c904D4A7Fc97A66b)

MonoToken address: [`0xC963bf29405884e3C0c52C16793Ead51Ccb88761`](https://kovan.etherscan.io/address/0xC963bf29405884e3C0c52C16793Ead51Ccb88761)

MonoswapStaking address: [`0x6549f8aE5dfee52B5da9127B8Dda7504798ec347`](https://kovan.etherscan.io/address/0x6549f8aE5dfee52B5da9127B8Dda7504798ec347)

### Contract on Mumbai Test Network

VCASH address: [`0xeB3333178D85F4792fE3201C9247B0c3eA44Ae10`](https://mumbai.polygonscan.com/address/0xeB3333178D85F4792fE3201C9247B0c3eA44Ae10)

MonoXPool address: [`0x94B0eAf72E4CC307Bf2B0Dd8834694F295305f89`](https://mumbai.polygonscan.com/address/0x94B0eAf72E4CC307Bf2B0Dd8834694F295305f89)

Monoswap address: [`0xf0086a7bF26E4be27D6bF2d9f9f108F321cc72E7`](https://mumbai.polygonscan.com/address/0xf0086a7bF26E4be27D6bF2d9f9f108F321cc72E7)

MonoToken address: [`0x63EE03B10E92849A1f61f2f462c66CdB09a3982C`](https://mumbai.polygonscan.com/address/0x63EE03B10E92849A1f61f2f462c66CdB09a3982C)

MonoswapStaking address: [`0xF269e315f8c72B8a1Beb2223632bbC046c6635D4`](https://mumbai.polygonscan.com/address/0xF269e315f8c72B8a1Beb2223632bbC046c6635D4)

## Integration&#x20;

Our Monoswap contract ([`kovan`](https://kovan.etherscan.io/address/0xE8141055b060BA9f7C75c6D5c904D4A7Fc97A66b)  or [`mumbai`](https://mumbai.polygonscan.com/address/0xf0086a7bF26E4be27D6bF2d9f9f108F321cc72E7)) has some core features available for the developers who are interested in using them externally.

#### What type of functions is available for a contract?

![Visit a contract link above, click into the Contract tab,  then select Write as Proxy to see all functions.](/files/-MkMKFhiSKL6pMeK11Xp)

### MonoX Core Functionalities

Some of the key functionalities we offer are:&#x20;

* `listNewToken`,&#x20;
* `addLiquidity`,&#x20;
* `addLiquidityETH`,&#x20;
* `removeLiquidity`,
* `swapExactTokenForToken` and `swapTokenForExactToken,`
* `swapExactETHForToken`, `swapExactTokenForETH`, `swapETHForExactToken` and `swapTokenForExactETH`

{% hint style="warning" %}
`listNewToken`, `addLiquidity`, `swapExactTokenForToken` and `swapTokenForExactToken` requires that the token has been approved in advance.
{% endhint %}

#### `listNewToken`

This function list tokens and adds liquidity with `vcashAmount` and `tokenAmount` then sends LP tokens to `to` address. So, the user can list a new token.&#x20;

```javascript
function listNewToken (
        address _token,        // Token address to list
        uint _price,           // Token price
        uint256 vcashAmount,   // VCASH amount to add initially
        uint256 tokenAmount,   // Token amount to add initially
        address to             // Address that gets liquidity
        )           
```

#### `addLiquidity`

This function adds liquidity to an ERC-20⇄ERC-20 pool. So, users can contribute into the pool.

```javascript
function addLiquidity (
        address _token,        // Token address
        uint256 _amount,       // Token amount to add
        address to             // Address to send LP token 
        )
```

#### `addLiquidityETH`

This function adds liquidity to an ERC-20⇄WETH pool with ETH. So, users can add liquidity to the ETH pool.

```javascript
function addLiquidityETH (
        address to             // Address to send LP token  
        )
```

#### `removeLiquidity`

This function removes liquidity to an ERC-20⇄ERC-20 pool.&#x20;

```javascript
function removeLiquidity (
        address _token,        // Token address
        uint256 liquidity,     // Liquidity
        address to,            // Token amount to add
        uint256 minVcashOut,   // The minimum amount of VCash that must be received
        uint256 minTokenOut    // The minimum amount of Token that must be received
        )
```

For removing ETH liquidity, use `removeLiquidityETH` function. It removes liquidity to an ERC-20⇄WETH pool with ETH.

#### `swapExactTokenForToken`

Users can swap tokens using `swapExactTokenForToken`. So, user's input token is known and the output token is calculated `swapTokenForExactToken`.

```javascript
function swapExactTokenForToken(
        address tokenIn,       // Input token address
        address tokenOut,      // Output token address
        uint amountIn,         // The amount of input tokens to send
        uint amountOutMin,     // The minimum amount of output tokens that must be received for the transaction not to revert
        address to,            // Recipient of the output tokens
        uint deadline          // Unix timestamp after which the transaction will revert
        )
```

#### `swapTokenForExactToken`

Users can swap tokens using `swapTokenForExactToken`. So, user's output token is known and the input token is calculated.

```javascript
 function swapTokenForExactToken(
        address tokenIn,       // Input token address
        address tokenOut,      // Output token address
        uint amountInMax,      // The maximum amount of input tokens that can be required before the transaction reverts
        uint amountOut,        // The amount of output tokens to receive
        address to,            // Recipient of the output tokens
        uint deadline          // Unix timestamp after which the transaction will revert
        )
```

For swapping ETH, please use one of below functions:

{% tabs %}
{% tab title="swapExactETHForToken" %}

```javascript
function swapExactETHForToken(
        address tokenOut,      // Output token address
        uint amountOutMin,     // The minimum amount of output tokens that must be received for the transaction not to revert
        address to,            // Recipient of the output tokens
        uint deadline          // Unix timestamp after which the transaction will revert
        )
```

{% endtab %}

{% tab title="swapExactTokenForETH" %}

```javascript
function swapExactTokenForETH(
        address tokenIn,       // Input token address
        uint amountIn,         // The amount of input tokens to send
        uint amountOutMin,     // The minimum amount of output tokens that must be received for the transaction not to revert
        address to,            // Recipient of the output tokens
        uint deadline          // Unix timestamp after which the transaction will revert
        )
```

{% endtab %}

{% tab title="swapETHForExactToken" %}

```javascript
function swapETHForExactToken(
        address tokenOut,      // Output token address
        uint amountInMax,      // The maximum amount of input tokens that can be required before the transaction reverts
        uint amountOut,        // The amount of output tokens to receive
        address to,            // Recipient of the output tokens
        uint deadline          // Unix timestamp after which the transaction will revert
        )
```

{% endtab %}

{% tab title="swapTokenForExactETH" %}

```javascript
function swapTokenForExactETH(
        address tokenIn,       // Input token address
        uint amountInMax,      // The maximum amount of input tokens that can be required before the transaction reverts  
        uint amountOut,        // The amount of output tokens to receive
        address to,            // Recipient of the output tokens
        uint deadline          // Unix timestamp after which the transaction will revert      
        )
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.monox.finance/developer-guides/how-to-integrate-with-monoswap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
