diff --git a/contracts/DODODrops/DODODropsV1.sol b/contracts/DODODrops/DODODropsV1.sol index e545250..ef7cdbc 100644 --- a/contracts/DODODrops/DODODropsV1.sol +++ b/contracts/DODODrops/DODODropsV1.sol @@ -84,7 +84,8 @@ contract DODODropsV1 is ERC721URIStorage, InitializableOwnable { function redeemPrize(uint256 ticketNum) external { require(_REDEEM_ALLOWED_, "REDEEM_CLOSED"); - require(!address(msg.sender).isContract(), "ONLY_ALLOW_EOA"); + // require(!address(msg.sender).isContract(), "ONLY_ALLOW_EOA"); + require(tx.origin == msg.sender, "ONLY_ALLOW_EOA"); require(ticketNum >= 1 && ticketNum <= _USER_TICKETS_[msg.sender], "TICKET_NUM_INVALID"); _USER_TICKETS_[msg.sender] = _USER_TICKETS_[msg.sender].sub(ticketNum); _TOTAL_TICKETS_ = _TOTAL_TICKETS_.sub(ticketNum); diff --git a/contracts/DODODrops/DODODropsV2/DODODrops.sol b/contracts/DODODrops/DODODropsV2/DODODrops.sol index c9c8086..5ef3e41 100644 --- a/contracts/DODODrops/DODODropsV2/DODODrops.sol +++ b/contracts/DODODrops/DODODropsV2/DODODrops.sol @@ -132,7 +132,8 @@ contract DODODrops is InitializableMintableERC20, ReentrancyGuard { } function redeemTicket(uint256 ticketNum, address referer) external { - require(!address(msg.sender).isContract(), "ONLY_ALLOW_EOA"); + // require(!address(msg.sender).isContract(), "ONLY_ALLOW_EOA"); + require(tx.origin == msg.sender, "ONLY_ALLOW_EOA"); require(ticketNum >= 1 && ticketNum <= balanceOf(msg.sender), "TICKET_NUM_INVALID"); _burn(msg.sender,ticketNum); for (uint256 i = 0; i < ticketNum; i++) {