This commit is contained in:
owen05
2021-09-24 09:39:15 +08:00
parent 013cbf66ca
commit 9fd16aa1f4
6 changed files with 12 additions and 8 deletions

View File

@@ -102,11 +102,11 @@ module.exports = {
// DropsERC1155: "0x3a8EcF30428bd4e33Cd7011533DFd596F7705c8F",
//=================== NFTPool ==================
DODONFTApprove: "0xb971B0df71fB1778351F25a0e3bfe0C3eF06E1d1",
DODONFTApprove: "0x9CA2A5FB3771d824FAc3a307ff6B0fbb992C00Bc",
FilterAdmin: "0xeD662e5391a3aA6F2FF610a5b33c62815b342B35",
FilterERC721V1: "0xce5CD3D57d4f9e781e6a6823D64e157B173e91D9",
FilterERC1155V1: "0xef4A80041B9b7b85038170F19367B93a24abe38B",
DODONFTPoolProxy: "0x38c109aF4f3454172BA4eecf5676aA213b589e75",
FilterERC721V1: "0xdE39C2901e72A883f7446951fB533219F3622b87",
FilterERC1155V1: "0x0727dEd495E35f4bA4F5D64794145152301Db23f",
DODONFTPoolProxy: "0x888B9d4C25664F8B1BF744e8F4397d1429314155",
NFTPoolController: "0xf5d24499dD76C3791ee6D19aa206f55b72270415"
}

View File

@@ -224,7 +224,7 @@ contract BaseFilterV1 is InitializableOwnable, ReentrancyGuard {
require(newCr != 0, "CR_INVALID");
_GS_START_IN_ = newGsStart;
_CR_IN_ = newCr;
_NFT_IN_TOGGLE_ = true;
_NFT_IN_TOGGLE_ = toggleFlag;
emit ChangeNFTInPrice(newGsStart, newCr, toggleFlag);
}
@@ -245,7 +245,7 @@ contract BaseFilterV1 is InitializableOwnable, ReentrancyGuard {
require(newCr != 0, "CR_INVALID");
_GS_START_RANDOM_OUT_ = newGsStart;
_CR_RANDOM_OUT_ = newCr;
_NFT_RANDOM_OUT_TOGGLE_ = true;
_NFT_RANDOM_OUT_TOGGLE_ = toggleFlag;
emit ChangeNFTRandomOutPrice(newGsStart, newCr, toggleFlag);
}
@@ -266,7 +266,7 @@ contract BaseFilterV1 is InitializableOwnable, ReentrancyGuard {
require(newCr != 0, "CR_INVALID");
_GS_START_TARGET_OUT_ = newGsStart;
_CR_TARGET_OUT_ = newCr;
_NFT_TARGET_OUT_TOGGLE_ = true;
_NFT_TARGET_OUT_TOGGLE_ = toggleFlag;
emit ChangeNFTTargetOutPrice(newGsStart, newCr, toggleFlag);
}

View File

@@ -40,6 +40,7 @@ contract Controller is InitializableOwnable {
uint256 nftOutFeeRate,
bool isOpen
) external onlyOwner {
require(nftInFeeRate <= 1e18 && nftOutFeeRate <= 1e18, "FEE_RATE_TOO_LARGE");
FilterAdminFeeRateInfo memory feeRateInfo = FilterAdminFeeRateInfo({
nftInFeeRate: nftInFeeRate,
nftOutFeeRate: nftOutFeeRate,
@@ -51,6 +52,7 @@ contract Controller is InitializableOwnable {
}
function setGlobalParam(uint256 nftInFeeRate, uint256 nftOutFeeRate) external onlyOwner {
require(nftInFeeRate <= 1e18 && nftOutFeeRate <= 1e18, "FEE_RATE_TOO_LARGE");
_GLOBAL_NFT_IN_FEE_RATE_ = nftInFeeRate;
_GLOBAL_NFT_OUT_FEE_RATE_ = nftOutFeeRate;

View File

@@ -38,6 +38,7 @@ contract FilterAdmin is InitializableInternalMintableERC20 {
address maintainer,
address[] memory filters
) external {
require(feeRate <= DecimalMath.ONE, "FEE_RATE_TOO_LARGE");
super.init(owner, initSupply, name, symbol, 18);
_INIT_SUPPLY_ = initSupply;
_FEE_RATE_ = feeRate;

View File

@@ -83,6 +83,7 @@ contract FilterERC1155V1 is IERC1155Receiver, BaseFilterV1 {
uint256[] memory amounts,
address to
) external preventReentrant returns (uint256 paid) {
require(tokenIds.length == amounts.length, "PARAM_INVALID");
uint256 avaliableNFTOutAmount = getAvaliableNFTOutAmount();
uint256 originTotalNftAmount = _TOTAL_NFT_AMOUNT_;

View File

@@ -16,7 +16,7 @@ import {IDODONFTApprove} from "../../intf/IDODONFTApprove.sol";
import {IERC20} from "../../intf/IERC20.sol";
import {SafeERC20} from "../../lib/SafeERC20.sol";
contract DODONFTPoolProxy is ReentrancyGuard, InitializableOwnable {
contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
using SafeMath for uint256;
using SafeERC20 for IERC20;