DPP trade test
This commit is contained in:
@@ -25,7 +25,6 @@ contract DPP is DPPTrader {
|
||||
address kSource,
|
||||
address iSource,
|
||||
address gasPriceSource,
|
||||
address dodoSmartApprove,
|
||||
address tradePermissionManager
|
||||
) external {
|
||||
initOwner(owner);
|
||||
@@ -38,7 +37,6 @@ contract DPP is DPPTrader {
|
||||
_K_ = IExternalValue(kSource);
|
||||
_GAS_PRICE_LIMIT_ = IExternalValue(gasPriceSource);
|
||||
_TRADE_PERMISSION_ = IPermissionManager(tradePermissionManager);
|
||||
_DODO_SMART_APPROVE_ = dodoSmartApprove;
|
||||
_resetTargetAndReserve();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,8 +27,6 @@ import {PMMPricing} from "../../lib/PMMPricing.sol";
|
||||
contract DPPStorage is InitializableOwnable, ReentrancyGuard {
|
||||
using SafeMath for uint256;
|
||||
|
||||
address public _DODO_SMART_APPROVE_;
|
||||
|
||||
// ============ Variables for Control ============
|
||||
|
||||
IExternalValue public _GAS_PRICE_LIMIT_;
|
||||
@@ -78,10 +76,6 @@ contract DPPStorage is InitializableOwnable, ReentrancyGuard {
|
||||
_MAINTAINER_ = newMaintainer;
|
||||
}
|
||||
|
||||
function setOperator(address newOperator) external onlyOwner {
|
||||
_OPERATOR_ = newOperator;
|
||||
}
|
||||
|
||||
function setGasPriceSource(address newGasPriceLimitSource) external onlyOwner {
|
||||
_GAS_PRICE_LIMIT_ = IExternalValue(newGasPriceLimitSource);
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ contract DPPVault is DPPStorage {
|
||||
}
|
||||
|
||||
function reset(
|
||||
address from,
|
||||
address assetTo,
|
||||
uint256 newLpFeeRate,
|
||||
uint256 newMtFeeRate,
|
||||
uint256 newI,
|
||||
@@ -73,8 +73,8 @@ contract DPPVault is DPPStorage {
|
||||
uint256 quoteOutAmount
|
||||
) public onlyOwner {
|
||||
require(newK > 0 && newK <= 10**18, "K OUT OF RANGE!");
|
||||
if (baseOutAmount > 0) _transferBaseOut(from, baseOutAmount);
|
||||
if (quoteOutAmount > 0) _transferQuoteOut(from, quoteOutAmount);
|
||||
_transferBaseOut(assetTo, baseOutAmount);
|
||||
_transferQuoteOut(assetTo, quoteOutAmount);
|
||||
_resetTargetAndReserve();
|
||||
_LP_FEE_RATE_MODEL_.setFeeRate(newLpFeeRate);
|
||||
_MT_FEE_RATE_MODEL_.setFeeRate(newMtFeeRate);
|
||||
|
||||
Reference in New Issue
Block a user