cp audit-fix && update event
This commit is contained in:
@@ -23,7 +23,10 @@ contract DPPVault is DPPStorage {
|
||||
|
||||
// ============ Events ============
|
||||
|
||||
event Reset();
|
||||
event Reset(
|
||||
uint256 newLpFeeRate,
|
||||
uint256 newMtFeeRate
|
||||
);
|
||||
|
||||
// ============ View Functions ============
|
||||
|
||||
@@ -32,6 +35,16 @@ contract DPPVault is DPPStorage {
|
||||
quoteReserve = _QUOTE_RESERVE_;
|
||||
}
|
||||
|
||||
function getUserFeeRate(address user) external view returns (uint256 lpFeeRate, uint256 mtFeeRate) {
|
||||
lpFeeRate = _LP_FEE_RATE_MODEL_.getFeeRate(user);
|
||||
mtFeeRate = _MT_FEE_RATE_MODEL_.getFeeRate(user);
|
||||
}
|
||||
|
||||
function getUserTradePermission(address user) external view returns (bool isBuyAllow, bool isSellAllow) {
|
||||
isBuyAllow = (!_BUYING_CLOSE_ && _TRADE_PERMISSION_.isAllowed(user));
|
||||
isSellAllow = (!_SELLING_CLOSE_ && _TRADE_PERMISSION_.isAllowed(user));
|
||||
}
|
||||
|
||||
// ============ Get Input ============
|
||||
|
||||
function getBaseInput() public view returns (uint256 input) {
|
||||
@@ -75,7 +88,7 @@ contract DPPVault is DPPStorage {
|
||||
_transferQuoteOut(assetTo, quoteOutAmount);
|
||||
_resetTargetAndReserve();
|
||||
_checkIK();
|
||||
emit Reset();
|
||||
emit Reset(newLpFeeRate, newMtFeeRate);
|
||||
}
|
||||
|
||||
function _setRState() internal {
|
||||
|
||||
Reference in New Issue
Block a user