mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
events uniswap
This commit is contained in:
parent
5002098a1d
commit
bfa50aaea7
|
@ -91,6 +91,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
|
||||||
|
@ -130,6 +146,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
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -156,6 +179,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