mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
comment added
This commit is contained in:
parent
f298a6da91
commit
5f52694075
|
@ -149,6 +149,12 @@ contract Helper {
|
||||||
|
|
||||||
contract InstaUniswapPool is Helper {
|
contract InstaUniswapPool is Helper {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title to add liquidity in pool
|
||||||
|
* @dev payable function token qty to deposit is decided as per the ETH sent by the user
|
||||||
|
* @param token ERC20 address of Uniswap's pool (eg:- DAI address, MKR address, etc)
|
||||||
|
* @param maxDepositedTokens Max token to be deposited
|
||||||
|
*/
|
||||||
function addLiquidity(address token, uint maxDepositedTokens) public payable returns (uint256 tokensMinted) {
|
function addLiquidity(address token, uint maxDepositedTokens) public payable returns (uint256 tokensMinted) {
|
||||||
address exchangeAddr = getExchangeAddress(token);
|
address exchangeAddr = getExchangeAddress(token);
|
||||||
(uint exchangeEthBal, uint exchangeTokenBal) = getBal(token, exchangeAddr);
|
(uint exchangeEthBal, uint exchangeTokenBal) = getBal(token, exchangeAddr);
|
||||||
|
@ -163,6 +169,14 @@ contract InstaUniswapPool is Helper {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @title to remove liquidity from pool
|
||||||
|
* @dev ETH and token quantity is decided as per the exchange token qty to burn
|
||||||
|
* @param token ERC20 address of Uniswap's pool (eg:- DAI address, MKR address, etc)
|
||||||
|
* @param amount Uniswap pool's ERC20 token QTY to burn
|
||||||
|
* @param minEth Min ETH user to be returned
|
||||||
|
* @param minTokens Min Tokens to be returned
|
||||||
|
*/
|
||||||
function removeLiquidity(
|
function removeLiquidity(
|
||||||
address token,
|
address token,
|
||||||
uint amount,
|
uint amount,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user