add free timestamp
This commit is contained in:
@@ -17,6 +17,13 @@ contract DPPAdmin is InitializableOwnable {
|
|||||||
address public _OPERATOR_;
|
address public _OPERATOR_;
|
||||||
address public _DODO_APPROVE_;
|
address public _DODO_APPROVE_;
|
||||||
|
|
||||||
|
uint256 public _FREEZE_TIMESTAMP_;
|
||||||
|
|
||||||
|
modifier notFreezed() {
|
||||||
|
require(block.timestamp >= _FREEZE_TIMESTAMP_, "ADMIN_FREEZED");
|
||||||
|
_;
|
||||||
|
}
|
||||||
|
|
||||||
function init(
|
function init(
|
||||||
address owner,
|
address owner,
|
||||||
address dpp,
|
address dpp,
|
||||||
@@ -29,6 +36,10 @@ contract DPPAdmin is InitializableOwnable {
|
|||||||
_DODO_APPROVE_ = dodoApprove;
|
_DODO_APPROVE_ = dodoApprove;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setFreezeTimestamp(uint256 timestamp) external notFreezed onlyOwner {
|
||||||
|
_FREEZE_TIMESTAMP_ = timestamp;
|
||||||
|
}
|
||||||
|
|
||||||
function setOperator(address newOperator) external onlyOwner {
|
function setOperator(address newOperator) external onlyOwner {
|
||||||
_OPERATOR_ = newOperator;
|
_OPERATOR_ = newOperator;
|
||||||
}
|
}
|
||||||
@@ -85,7 +96,7 @@ contract DPPAdmin is InitializableOwnable {
|
|||||||
uint256 newK,
|
uint256 newK,
|
||||||
uint256 baseOutAmount,
|
uint256 baseOutAmount,
|
||||||
uint256 quoteOutAmount
|
uint256 quoteOutAmount
|
||||||
) external {
|
) external notFreezed {
|
||||||
require(
|
require(
|
||||||
msg.sender == _OWNER_ ||
|
msg.sender == _OWNER_ ||
|
||||||
(msg.sender == IDODOApprove(_DODO_APPROVE_).getDODOProxy() &&
|
(msg.sender == IDODOApprove(_DODO_APPROVE_).getDODOProxy() &&
|
||||||
|
|||||||
Reference in New Issue
Block a user