DPP factory and init

This commit is contained in:
owen05
2020-11-22 18:20:09 +08:00
parent 857e4fc01a
commit f2656d6b2a
19 changed files with 376 additions and 109 deletions

View File

@@ -14,7 +14,8 @@ import {DecimalMath} from "../../lib/DecimalMath.sol";
import {ReentrancyGuard} from "../../lib/ReentrancyGuard.sol";
import {IPermissionManager} from "../../lib/PermissionManager.sol";
import {IExternalValue} from "../../lib/ExternalValue.sol";
import {IFeeRateModel} from "../../intf/IFeeRateModel.sol";
import {IFeeRateModel} from "../../lib/FeeRateModel.sol";
import {ISmartApprove} from "../../intf/ISmartApprove.sol";
import {IERC20} from "../../intf/IERC20.sol";
import {PMMPricing} from "../../lib/PMMPricing.sol";
@@ -27,6 +28,9 @@ import {PMMPricing} from "../../lib/PMMPricing.sol";
contract DPPStorage is InitializableOwnable, ReentrancyGuard {
using SafeMath for uint256;
address public _FACTORY_;
ISmartApprove public _DODO_SMART_APPROVE_;
// ============ Variables for Control ============
IExternalValue public _GAS_PRICE_LIMIT_;
@@ -80,6 +84,14 @@ contract DPPStorage is InitializableOwnable, ReentrancyGuard {
_GAS_PRICE_LIMIT_ = IExternalValue(newGasPriceLimitSource);
}
function setISource(address newISource) external onlyOwner {
_I_ = IExternalValue(newISource);
}
function setKSource(address newKSource) external onlyOwner {
_K_ = IExternalValue(newKSource);
}
function setBuy(bool open) external onlyOwner {
_BUYING_CLOSE_ = !open;
}