fix
This commit is contained in:
@@ -102,11 +102,11 @@ module.exports = {
|
|||||||
// DropsERC1155: "0x3a8EcF30428bd4e33Cd7011533DFd596F7705c8F",
|
// DropsERC1155: "0x3a8EcF30428bd4e33Cd7011533DFd596F7705c8F",
|
||||||
|
|
||||||
//=================== NFTPool ==================
|
//=================== NFTPool ==================
|
||||||
DODONFTApprove: "0x9CA2A5FB3771d824FAc3a307ff6B0fbb992C00Bc",
|
DODONFTApprove: "0x40F3bBe2f8C5F2E5f4adFf7d51f652F2B9F77315",
|
||||||
FilterAdmin: "0x729f7f44bf64Ce814716b6261e267DbE6cdf021c",
|
FilterAdmin: "0x729f7f44bf64Ce814716b6261e267DbE6cdf021c",
|
||||||
FilterERC721V1: "0x72d220cE168C4f361dD4deE5D826a01AD8598f6C",
|
FilterERC721V1: "0x47E2C563cDCd7F36B4E77cc33a6A5c152663f915",
|
||||||
FilterERC1155V1: "0x80930Cb1849F7D42531506fF45E66724338A821b",
|
FilterERC1155V1: "0x55e2e1fe50FfaBd4fE3712Bd1aBfc9307a44c7F4",
|
||||||
DODONFTPoolProxy: "0x888B9d4C25664F8B1BF744e8F4397d1429314155",
|
DODONFTPoolProxy: "0xb23150F62D3089BB3Fa181ee6185324cdECE1942",
|
||||||
NFTPoolController: "0xf5d24499dD76C3791ee6D19aa206f55b72270415"
|
NFTPoolController: "0xf5d24499dD76C3791ee6D19aa206f55b72270415"
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
|
|||||||
address public immutable _DODO_NFT_APPROVE_;
|
address public immutable _DODO_NFT_APPROVE_;
|
||||||
address public immutable _DODO_APPROVE_;
|
address public immutable _DODO_APPROVE_;
|
||||||
|
|
||||||
|
mapping (address => bool) public isWhiteListed;
|
||||||
|
|
||||||
// ============ Event ==============
|
// ============ Event ==============
|
||||||
event SetFilterTemplate(uint256 idx, address filterTemplate);
|
event SetFilterTemplate(uint256 idx, address filterTemplate);
|
||||||
@@ -44,6 +45,7 @@ contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
|
|||||||
event ChangeMaintainer(address newMaintainer);
|
event ChangeMaintainer(address newMaintainer);
|
||||||
event ChangeContoller(address newController);
|
event ChangeContoller(address newController);
|
||||||
event ChangeFilterAdminTemplate(address newFilterAdminTemplate);
|
event ChangeFilterAdminTemplate(address newFilterAdminTemplate);
|
||||||
|
event ChangeWhiteList(address contractAddr, bool isWhiteListed);
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
address cloneFactory,
|
address cloneFactory,
|
||||||
@@ -177,6 +179,9 @@ contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
|
|||||||
uint256[] memory spreadIds
|
uint256[] memory spreadIds
|
||||||
) public returns(address newFilterV1) {
|
) public returns(address newFilterV1) {
|
||||||
newFilterV1 = ICloneFactory(_CLONE_FACTORY_).clone(_FILTER_TEMPLATES_[key]);
|
newFilterV1 = ICloneFactory(_CLONE_FACTORY_).clone(_FILTER_TEMPLATES_[key]);
|
||||||
|
|
||||||
|
emit CreateFilterV1(filterAdmin, newFilterV1, nftCollection, key);
|
||||||
|
|
||||||
IFilter(newFilterV1).init(
|
IFilter(newFilterV1).init(
|
||||||
filterAdmin,
|
filterAdmin,
|
||||||
nftCollection,
|
nftCollection,
|
||||||
@@ -186,8 +191,6 @@ contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
|
|||||||
priceRules,
|
priceRules,
|
||||||
spreadIds
|
spreadIds
|
||||||
);
|
);
|
||||||
|
|
||||||
emit CreateFilterV1(filterAdmin, newFilterV1, nftCollection, key);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -213,6 +216,7 @@ contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
|
|||||||
|
|
||||||
_generalApproveMax(filterAdmin, _DODO_APPROVE_, receivedFragAmount);
|
_generalApproveMax(filterAdmin, _DODO_APPROVE_, receivedFragAmount);
|
||||||
|
|
||||||
|
require(isWhiteListed[dodoProxy], "Not Whitelist Proxy Contract");
|
||||||
(bool success, ) = dodoProxy.call(dodoSwapData);
|
(bool success, ) = dodoProxy.call(dodoSwapData);
|
||||||
require(success, "API_SWAP_FAILED");
|
require(success, "API_SWAP_FAILED");
|
||||||
|
|
||||||
@@ -245,6 +249,10 @@ contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
|
|||||||
emit SetFilterTemplate(idx, newFilterTemplate);
|
emit SetFilterTemplate(idx, newFilterTemplate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeWhiteList(address contractAddr, bool isWhiteListed) external onlyOwner {
|
||||||
|
isWhiteListed[contractAddr] = isWhiteListed;
|
||||||
|
emit ChangeWhiteList(contractAddr, isWhiteListed);
|
||||||
|
}
|
||||||
|
|
||||||
//======================= Internal =====================
|
//======================= Internal =====================
|
||||||
function _generalApproveMax(
|
function _generalApproveMax(
|
||||||
|
|||||||
Reference in New Issue
Block a user