mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
Merge branch 'master' of https://github.com/Sowmayjain/InstaProxyContract
This commit is contained in:
commit
651ffbd4e5
|
@ -84,6 +84,22 @@ contract Helper {
|
||||||
|
|
||||||
contract Pool is Helper {
|
contract Pool is Helper {
|
||||||
|
|
||||||
|
event LogAddLiquidity(
|
||||||
|
address token,
|
||||||
|
uint tokenAmt,
|
||||||
|
uint ethAmt,
|
||||||
|
uint poolTokenMinted,
|
||||||
|
address beneficiary
|
||||||
|
);
|
||||||
|
|
||||||
|
event LogRemoveLiquidity(
|
||||||
|
address token,
|
||||||
|
uint tokenReturned,
|
||||||
|
uint ethReturned,
|
||||||
|
uint poolTokenBurned,
|
||||||
|
address beneficiary
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dev Uniswap's pool basic details
|
* @dev Uniswap's pool basic details
|
||||||
* @param token token address to get pool. Eg:- DAI address, MKR address, etc
|
* @param token token address to get pool. Eg:- DAI address, MKR address, etc
|
||||||
|
@ -123,6 +139,13 @@ contract Pool is Helper {
|
||||||
tokenToDeposit,
|
tokenToDeposit,
|
||||||
uint(1899063809) // 6th March 2030 GMT // no logic
|
uint(1899063809) // 6th March 2030 GMT // no logic
|
||||||
);
|
);
|
||||||
|
emit LogAddLiquidity(
|
||||||
|
token,
|
||||||
|
tokenToDeposit,
|
||||||
|
msg.value,
|
||||||
|
tokensMinted,
|
||||||
|
msg.sender
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -149,6 +172,13 @@ contract Pool is Helper {
|
||||||
);
|
);
|
||||||
address(msg.sender).transfer(ethReturned);
|
address(msg.sender).transfer(ethReturned);
|
||||||
IERC20(token).transfer(msg.sender, tokenReturned);
|
IERC20(token).transfer(msg.sender, tokenReturned);
|
||||||
|
emit LogRemoveLiquidity(
|
||||||
|
token,
|
||||||
|
tokenReturned,
|
||||||
|
ethReturned,
|
||||||
|
amount,
|
||||||
|
msg.sender
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user