nftPool out fix

This commit is contained in:
owen05
2021-09-27 15:11:03 +08:00
parent 5af15a4eff
commit 15675bf5f2
7 changed files with 33 additions and 80 deletions

View File

@@ -35,10 +35,6 @@ contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
event SetFilterTemplate(uint256 idx, address filterTemplate);
event Erc721In(address filter, address to, uint256 received);
event Erc1155In(address filter, address to, uint256 received);
event Erc721TargetOut(address filter, address to, uint256 paid);
event Erc1155TargetOut(address filter, address to, uint256 paid);
event Erc721RandomOut(address filter, address to, uint256 paid);
event Erc1155RandomOut(address filter, address to, uint256 paid);
event CreateLiteNFTPool(address newFilterAdmin, address filterAdminOwner);
event CreateNFTPool(address newFilterAdmin, address filterAdminOwner, address filter);
@@ -83,30 +79,6 @@ contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
emit Erc721In(filter, to, received);
}
function erc721TargetOut(
address filter,
uint256[] memory tokenIds,
// address to,
uint256 maxBurnAmount
) external {
uint256 paid = IFilter(filter).ERC721TargetOut(tokenIds, msg.sender);
require(paid <= maxBurnAmount, "BURN_AMOUNT_EXCEED");
emit Erc721TargetOut(filter, msg.sender, paid);
}
function erc721RandomOut(
address filter,
uint256 amount,
// address to,
uint256 maxBurnAmount
) external {
uint256 paid = IFilter(filter).ERC721RandomOut(amount, msg.sender);
require(paid <= maxBurnAmount, "BURN_AMOUNT_EXCEED");
emit Erc721RandomOut(filter, msg.sender, paid);
}
// ================== ERC1155 In and Out ===================
function erc1155In(
address filter,
@@ -126,32 +98,6 @@ contract DODONFTPoolProxy is InitializableOwnable, ReentrancyGuard {
emit Erc1155In(filter, to, received);
}
function erc1155TargetOut(
address filter,
uint256[] memory tokenIds,
uint256[] memory amounts,
// address to,
uint256 maxBurnAmount
) external {
uint256 paid = IFilter(filter).ERC1155TargetOut(tokenIds, amounts, msg.sender);
require(paid <= maxBurnAmount, "BURN_AMOUNT_EXCEED");
emit Erc1155TargetOut(filter, msg.sender, paid);
}
function erc1155RandomOut(
address filter,
uint256 amount,
// address to,
uint256 maxBurnAmount
) external {
uint256 paid = IFilter(filter).ERC1155RandomOut(amount, msg.sender);
require(paid <= maxBurnAmount, "BURN_AMOUNT_EXCEED");
emit Erc1155RandomOut(filter, msg.sender, paid);
}
// ================== Create NFTPool ===================
function createLiteNFTPool(
address filterAdminOwner,