Files
dodo-contractV2/contracts/DODOVendingMachine/impl/DVMAdmin.sol

56 lines
1.5 KiB
Solidity
Raw Normal View History

2020-11-24 17:25:10 +08:00
/*
Copyright 2020 DODO ZOO.
SPDX-License-Identifier: Apache-2.0
*/
pragma solidity 0.6.9;
pragma experimental ABIEncoderV2;
import {IDVM} from "../intf/IDVM.sol";
import {InitializableOwnable} from "../../lib/InitializableOwnable.sol";
contract DVMAdmin is InitializableOwnable {
2020-11-26 13:35:22 +08:00
address public _DVM_;
2020-11-24 17:25:10 +08:00
2020-11-26 13:35:22 +08:00
function init(address owner, address dvm) external {
2020-11-24 17:25:10 +08:00
initOwner(owner);
2020-11-26 13:35:22 +08:00
_DVM_ = dvm;
2020-11-24 17:25:10 +08:00
}
function setLpFeeRateModel(address newLpFeeRateModel) external onlyOwner {
2020-11-26 13:35:22 +08:00
IDVM(_DVM_).setLpFeeRateModel(newLpFeeRateModel);
2020-11-24 17:25:10 +08:00
}
function setMtFeeRateModel(address newMtFeeRateModel) external onlyOwner {
2020-11-26 13:35:22 +08:00
IDVM(_DVM_).setMtFeeRateModel(newMtFeeRateModel);
2020-11-24 17:25:10 +08:00
}
function setTradePermissionManager(address newTradePermissionManager) external onlyOwner {
2020-11-26 13:35:22 +08:00
IDVM(_DVM_).setTradePermissionManager(newTradePermissionManager);
2020-11-24 17:25:10 +08:00
}
function setMaintainer(address newMaintainer) external onlyOwner {
2020-11-26 13:35:22 +08:00
IDVM(_DVM_).setMaintainer(newMaintainer);
2020-11-24 17:25:10 +08:00
}
function setGasPriceSource(address newGasPriceLimitSource) external onlyOwner {
2020-11-26 13:35:22 +08:00
IDVM(_DVM_).setGasPriceSource(newGasPriceLimitSource);
2020-11-24 17:25:10 +08:00
}
function setBuy(bool open) external onlyOwner {
2020-11-26 13:35:22 +08:00
IDVM(_DVM_).setBuy(open);
2020-11-24 17:25:10 +08:00
}
function setSell(bool open) external onlyOwner {
2020-11-26 13:35:22 +08:00
IDVM(_DVM_).setSell(open);
2020-11-24 17:25:10 +08:00
}
// ============ Admin Version Control ============
function version() external pure returns (uint256) {
return 100; // 1.0.0
}
2020-11-24 17:25:10 +08:00
}