⚙️ 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).

How to get ABI of a contract?

Visit a link below, navigate into the Contract tab, then scroll until you see Contract ABI.

Contracts on Ethereum Mainnet

Contracts on Polygon Mainnet

Contract on Kovan Test Network

MonoswapStaking address: 0x6549f8aE5dfee52B5da9127B8Dda7504798ec347

Contract on Mumbai Test Network

MonoswapStaking address: 0xF269e315f8c72B8a1Beb2223632bbC046c6635D4

Integration

Our Monoswap contract (kovan or mumbai) 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.

MonoX Core Functionalities

Some of the key functionalities we offer are:
  • listNewToken,
  • addLiquidity,
  • addLiquidityETH,
  • removeLiquidity,
  • swapExactTokenForToken and swapTokenForExactToken,
  • swapExactETHForToken, swapExactTokenForETH, swapETHForExactToken and swapTokenForExactETH
listNewToken, addLiquidity, swapExactTokenForToken and swapTokenForExactToken requires that the token has been approved in advance.

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.
1
function listNewToken (
2
address _token, // Token address to list
3
uint _price, // Token price
4
uint256 vcashAmount, // VCASH amount to add initially
5
uint256 tokenAmount, // Token amount to add initially
6
address to // Address that gets liquidity
7
)
Copied!

addLiquidity

This function adds liquidity to an ERC-20⇄ERC-20 pool. So, users can contribute into the pool.
1
function addLiquidity (
2
address _token, // Token address
3
uint256 _amount, // Token amount to add
4
address to // Address to send LP token
5
)
Copied!

addLiquidityETH

This function adds liquidity to an ERC-20⇄WETH pool with ETH. So, users can add liquidity to the ETH pool.
1
function addLiquidityETH (
2
address to // Address to send LP token
3
)
Copied!

removeLiquidity

This function removes liquidity to an ERC-20⇄ERC-20 pool.
1
function removeLiquidity (
2
address _token, // Token address
3
uint256 liquidity, // Liquidity
4
address to, // Token amount to add
5
uint256 minVcashOut, // The minimum amount of VCash that must be received
6
uint256 minTokenOut // The minimum amount of Token that must be received
7
)
Copied!
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.
1
function swapExactTokenForToken(
2
address tokenIn, // Input token address
3
address tokenOut, // Output token address
4
uint amountIn, // The amount of input tokens to send
5
uint amountOutMin, // The minimum amount of output tokens that must be received for the transaction not to revert
6
address to, // Recipient of the output tokens
7
uint deadline // Unix timestamp after which the transaction will revert
8
)
Copied!

swapTokenForExactToken

Users can swap tokens using swapTokenForExactToken. So, user's output token is known and the input token is calculated.
1
function swapTokenForExactToken(
2
address tokenIn, // Input token address
3
address tokenOut, // Output token address
4
uint amountInMax, // The maximum amount of input tokens that can be required before the transaction reverts
5
uint amountOut, // The amount of output tokens to receive
6
address to, // Recipient of the output tokens
7
uint deadline // Unix timestamp after which the transaction will revert
8
)
Copied!
For swapping ETH, please use one of below functions:
swapExactETHForToken
swapExactTokenForETH
swapETHForExactToken
swapTokenForExactETH
1
function swapExactETHForToken(
2
address tokenOut, // Output token address
3
uint amountOutMin, // The minimum amount of output tokens that must be received for the transaction not to revert
4
address to, // Recipient of the output tokens
5
uint deadline // Unix timestamp after which the transaction will revert
6
)
Copied!
1
function swapExactTokenForETH(
2
address tokenIn, // Input token address
3
uint amountIn, // The amount of input tokens to send
4
uint amountOutMin, // The minimum amount of output tokens that must be received for the transaction not to revert
5
address to, // Recipient of the output tokens
6
uint deadline // Unix timestamp after which the transaction will revert
7
)
Copied!
1
function swapETHForExactToken(
2
address tokenOut, // Output token address
3
uint amountInMax, // The maximum amount of input tokens that can be required before the transaction reverts
4
uint amountOut, // The amount of output tokens to receive
5
address to, // Recipient of the output tokens
6
uint deadline // Unix timestamp after which the transaction will revert
7
)
Copied!
1
function swapTokenForExactETH(
2
address tokenIn, // Input token address
3
uint amountInMax, // The maximum amount of input tokens that can be required before the transaction reverts
4
uint amountOut, // The amount of output tokens to receive
5
address to, // Recipient of the output tokens
6
uint deadline // Unix timestamp after which the transaction will revert
7
)
Copied!
Last modified 6d ago