This commit is contained in:
Sowmayjain 2019-04-19 02:46:14 +05:30
commit 651ffbd4e5

View File

@ -84,6 +84,22 @@ contract 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
* @param token token address to get pool. Eg:- DAI address, MKR address, etc
@ -123,6 +139,13 @@ contract Pool is Helper {
tokenToDeposit,
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);
IERC20(token).transfer(msg.sender, tokenReturned);
emit LogRemoveLiquidity(
token,
tokenReturned,
ethReturned,
amount,
msg.sender
);
}
}