This commit is contained in:
owen05
2021-03-09 15:43:02 +08:00
parent 94ba7fbd21
commit 01c5447802
5 changed files with 65 additions and 3 deletions

View File

@@ -31,6 +31,9 @@ contract DVM is DVMTrader, DVMFunding {
uint256 k,
bool isOpenTWAP
) external {
require(!_DVM_INITIALIZED_, "DVM_INITIALIZED");
_DVM_INITIALIZED_ = true;
require(baseTokenAddress != quoteTokenAddress, "BASE_QUOTE_CAN_NOT_BE_SAME");
_BASE_TOKEN_ = IERC20(baseTokenAddress);
_QUOTE_TOKEN_ = IERC20(quoteTokenAddress);

View File

@@ -21,6 +21,8 @@ contract DVMStorage is ReentrancyGuard {
bool public _IS_OPEN_TWAP_ = false;
bool internal _DVM_INITIALIZED_;
// ============ Core Address ============
address public _MAINTAINER_;