From 5154c86e2498cf8ee697e9188d3ee2b54ac06806 Mon Sep 17 00:00:00 2001 From: owen05 Date: Fri, 27 Nov 2020 00:00:36 +0800 Subject: [PATCH] fix owner --- contracts/DODOPrivatePool/impl/DPPStorage.sol | 4 ---- contracts/DODOVendingMachine/impl/DVMStorage.sol | 4 ---- contracts/SmartRoute/DODOV2Proxy01.sol | 6 +++--- contracts/intf/IDODOV2.sol | 4 ++-- contracts/intf/IDODOV2Proxy01.sol | 2 -- 5 files changed, 5 insertions(+), 15 deletions(-) diff --git a/contracts/DODOPrivatePool/impl/DPPStorage.sol b/contracts/DODOPrivatePool/impl/DPPStorage.sol index 72b4c92..50ec915 100644 --- a/contracts/DODOPrivatePool/impl/DPPStorage.sol +++ b/contracts/DODOPrivatePool/impl/DPPStorage.sol @@ -106,8 +106,4 @@ contract DPPStorage is InitializableOwnable, ReentrancyGuard { return _MT_FEE_RATE_MODEL_.getFeeRate(trader); } - function getOwner() external view returns (address) { - return _OWNER_; - } - } diff --git a/contracts/DODOVendingMachine/impl/DVMStorage.sol b/contracts/DODOVendingMachine/impl/DVMStorage.sol index b7e4aed..c3be8e9 100644 --- a/contracts/DODOVendingMachine/impl/DVMStorage.sol +++ b/contracts/DODOVendingMachine/impl/DVMStorage.sol @@ -97,9 +97,5 @@ contract DVMStorage is InitializableOwnable, ReentrancyGuard { function getMtFeeRate(address trader) external view returns (uint256 feeRate) { return _MT_FEE_RATE_MODEL_.getFeeRate(trader); } - - function getOwner() external view returns (address) { - return _OWNER_; - } } diff --git a/contracts/SmartRoute/DODOV2Proxy01.sol b/contracts/SmartRoute/DODOV2Proxy01.sol index ea49232..f4f81d7 100644 --- a/contracts/SmartRoute/DODOV2Proxy01.sol +++ b/contracts/SmartRoute/DODOV2Proxy01.sol @@ -241,7 +241,7 @@ contract DODOV2Proxy01 is IDODOV2Proxy01 { IDODOV2(smartApprove).claimTokens(IDODOV2(DPPAddress)._BASE_TOKEN_(), msg.sender, DPPAddress, baseInAmount); if(quoteInAmount > 0) IDODOV2(smartApprove).claimTokens(IDODOV2(DPPAddress)._QUOTE_TOKEN_(), msg.sender, DPPAddress, quoteInAmount); - IDODOV2(IDODOV2(DPPAddress).getOwner()).reset( + IDODOV2(IDODOV2(DPPAddress)._OWNER_()).reset( msg.sender, newLpFeeRate, newMtFeeRate, @@ -284,7 +284,7 @@ contract DODOV2Proxy01 is IDODOV2Proxy01 { } } if( (flag == 3 && baseOutAmount > 0) || (flag == 4 && quoteOutAmount > 0) ) { - IDODOV2(IDODOV2(DPPAddress).getOwner()).resetETH( + IDODOV2(IDODOV2(DPPAddress)._OWNER_()).resetETH( msg.sender, newLpFeeRate, newMtFeeRate, @@ -315,7 +315,7 @@ contract DODOV2Proxy01 is IDODOV2Proxy01 { } } }else { - IDODOV2(IDODOV2(DPPAddress).getOwner()).reset( + IDODOV2(IDODOV2(DPPAddress)._OWNER_()).reset( msg.sender, newLpFeeRate, newMtFeeRate, diff --git a/contracts/intf/IDODOV2.sol b/contracts/intf/IDODOV2.sol index 2205ef4..e42d910 100644 --- a/contracts/intf/IDODOV2.sol +++ b/contracts/intf/IDODOV2.sol @@ -8,8 +8,6 @@ pragma solidity 0.6.9; pragma experimental ABIEncoderV2; -import {IERC20} from "./IERC20.sol"; - interface IDODOV2 { //========== Common ================== @@ -24,6 +22,8 @@ interface IDODOV2 { function _QUOTE_TOKEN_() external returns (address); + function _OWNER_() external returns (address); + function getOwner() external view returns (address); //========== DODOVendingMachine ======== diff --git a/contracts/intf/IDODOV2Proxy01.sol b/contracts/intf/IDODOV2Proxy01.sol index bc30b6b..82e0f67 100644 --- a/contracts/intf/IDODOV2Proxy01.sol +++ b/contracts/intf/IDODOV2Proxy01.sol @@ -8,8 +8,6 @@ pragma solidity 0.6.9; pragma experimental ABIEncoderV2; -import {IERC20} from "./IERC20.sol"; - interface IDODOV2Proxy01 { function dodoSwapETHToToken( address payable assetTo,