From 58b87283a8b4911d2b02c63d79d663168a47b5fa Mon Sep 17 00:00:00 2001 From: owen05 Date: Tue, 3 Aug 2021 14:32:16 +0800 Subject: [PATCH] update feeRateImpl --- contracts/DODOFee/FeeRateDIP3Impl.sol | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contracts/DODOFee/FeeRateDIP3Impl.sol b/contracts/DODOFee/FeeRateDIP3Impl.sol index 4972bfe..d6df740 100644 --- a/contracts/DODOFee/FeeRateDIP3Impl.sol +++ b/contracts/DODOFee/FeeRateDIP3Impl.sol @@ -45,6 +45,8 @@ contract FeeRateDIP3Impl is InitializableOwnable { } mapping(address => CPPoolInfo) cpPools; + mapping(address => uint256) public specPoolList; + // ============ Ownable Functions ============ @@ -69,9 +71,18 @@ contract FeeRateDIP3Impl is InitializableOwnable { _LP_MT_RATIO_ = newLpMtRatio; } + + function setSpecPoolList (address poolAddr, uint256 mtFeeRate) public onlyOwner { + specPoolList[poolAddr] = mtFeeRate; + } + // ============ View Functions ============ function getFeeRate(address pool, address user) external view returns (uint256) { + if(specPoolList[pool] != 0) { + return specPoolList[pool]; + } + try IPool(pool).version() returns (string memory poolVersion) { bytes32 hashPoolVersion = keccak256(abi.encodePacked(poolVersion)); if(hashPoolVersion == keccak256(abi.encodePacked("CP 1.0.0"))) {