remove dodoapprove in require
This commit is contained in:
@@ -62,47 +62,25 @@ contract DPPOracleAdmin is InitializableOwnable {
|
|||||||
IDPPOracle(_DPP_).retrieve(to, token, amount);
|
IDPPOracle(_DPP_).retrieve(to, token, amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
function changeOracle(address newOracle) external notFreezed {
|
function changeOracle(address newOracle) external onlyOwner notFreezed {
|
||||||
require(
|
|
||||||
msg.sender == _OWNER_ ||
|
|
||||||
(IDODOApproveProxy(_DODO_APPROVE_PROXY_).isAllowedProxy(msg.sender)),
|
|
||||||
"CHANGEORACLE FORBIDDEN!"
|
|
||||||
);
|
|
||||||
IDPPOracle(_DPP_).changeOracle(newOracle);
|
IDPPOracle(_DPP_).changeOracle(newOracle);
|
||||||
}
|
}
|
||||||
|
|
||||||
function enableOracle() external notFreezed {
|
function enableOracle() external onlyOwner notFreezed {
|
||||||
require(
|
|
||||||
msg.sender == _OWNER_ ||
|
|
||||||
(IDODOApproveProxy(_DODO_APPROVE_PROXY_).isAllowedProxy(msg.sender)),
|
|
||||||
"CHANGEORACLE FORBIDDEN!"
|
|
||||||
);
|
|
||||||
IDPPOracle(_DPP_).enableOracle();
|
IDPPOracle(_DPP_).enableOracle();
|
||||||
}
|
}
|
||||||
|
|
||||||
function disableOracle(uint256 newI) external notFreezed {
|
function disableOracle(uint256 newI) external onlyOwner notFreezed {
|
||||||
require(
|
|
||||||
msg.sender == _OWNER_ ||
|
|
||||||
(IDODOApproveProxy(_DODO_APPROVE_PROXY_).isAllowedProxy(msg.sender)),
|
|
||||||
"CHANGEORACLE FORBIDDEN!"
|
|
||||||
);
|
|
||||||
IDPPOracle(_DPP_).disableOracle(newI);
|
IDPPOracle(_DPP_).disableOracle(newI);
|
||||||
}
|
}
|
||||||
|
|
||||||
function tuneParameters(
|
function tuneParameters(
|
||||||
address operator,
|
|
||||||
uint256 newLpFeeRate,
|
uint256 newLpFeeRate,
|
||||||
uint256 newI,
|
uint256 newI,
|
||||||
uint256 newK,
|
uint256 newK,
|
||||||
uint256 minBaseReserve,
|
uint256 minBaseReserve,
|
||||||
uint256 minQuoteReserve
|
uint256 minQuoteReserve
|
||||||
) external notFreezed returns (bool) {
|
) external onlyOwner notFreezed returns (bool) {
|
||||||
require(
|
|
||||||
msg.sender == _OWNER_ ||
|
|
||||||
(IDODOApproveProxy(_DODO_APPROVE_PROXY_).isAllowedProxy(msg.sender) &&
|
|
||||||
operator == _OPERATOR_),
|
|
||||||
"TUNEPARAMS FORBIDDEN!"
|
|
||||||
);
|
|
||||||
return
|
return
|
||||||
IDPPOracle(_DPP_).tuneParameters(
|
IDPPOracle(_DPP_).tuneParameters(
|
||||||
newLpFeeRate,
|
newLpFeeRate,
|
||||||
@@ -114,17 +92,10 @@ contract DPPOracleAdmin is InitializableOwnable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tunePrice(
|
function tunePrice(
|
||||||
address operator,
|
|
||||||
uint256 newI,
|
uint256 newI,
|
||||||
uint256 minBaseReserve,
|
uint256 minBaseReserve,
|
||||||
uint256 minQuoteReserve
|
uint256 minQuoteReserve
|
||||||
) external notFreezed returns (bool) {
|
) external onlyOwner notFreezed returns (bool) {
|
||||||
require(
|
|
||||||
msg.sender == _OWNER_ ||
|
|
||||||
(IDODOApproveProxy(_DODO_APPROVE_PROXY_).isAllowedProxy(msg.sender) &&
|
|
||||||
operator == _OPERATOR_),
|
|
||||||
"TUNEPRICE FORBIDDEN!"
|
|
||||||
);
|
|
||||||
return
|
return
|
||||||
IDPPOracle(_DPP_).tunePrice(
|
IDPPOracle(_DPP_).tunePrice(
|
||||||
newI,
|
newI,
|
||||||
@@ -135,7 +106,6 @@ contract DPPOracleAdmin is InitializableOwnable {
|
|||||||
|
|
||||||
|
|
||||||
function reset(
|
function reset(
|
||||||
address operator,
|
|
||||||
uint256 newLpFeeRate,
|
uint256 newLpFeeRate,
|
||||||
uint256 newI,
|
uint256 newI,
|
||||||
uint256 newK,
|
uint256 newK,
|
||||||
@@ -143,13 +113,7 @@ contract DPPOracleAdmin is InitializableOwnable {
|
|||||||
uint256 quoteOutAmount,
|
uint256 quoteOutAmount,
|
||||||
uint256 minBaseReserve,
|
uint256 minBaseReserve,
|
||||||
uint256 minQuoteReserve
|
uint256 minQuoteReserve
|
||||||
) external notFreezed returns (bool) {
|
) external onlyOwner notFreezed returns (bool) {
|
||||||
require(
|
|
||||||
msg.sender == _OWNER_ ||
|
|
||||||
(IDODOApproveProxy(_DODO_APPROVE_PROXY_).isAllowedProxy(msg.sender) &&
|
|
||||||
operator == _OPERATOR_),
|
|
||||||
"RESET FORBIDDEN!"
|
|
||||||
);
|
|
||||||
return
|
return
|
||||||
IDPPOracle(_DPP_).reset(
|
IDPPOracle(_DPP_).reset(
|
||||||
_OWNER_, //only support asset transfer out to owner
|
_OWNER_, //only support asset transfer out to owner
|
||||||
|
|||||||
Reference in New Issue
Block a user