update mysteryBoxV2
This commit is contained in:
@@ -9,7 +9,7 @@ module.exports = {
|
||||
DODOSellHelper: "0xDfaf9584F5d229A9DBE5978523317820A8897C5A",
|
||||
DODOCalleeHelper: "0x2BBD66fC4898242BDBD2583BBe1d76E8b8f71445",
|
||||
DODOV1PmmHelper: "0x18DFdE99F578A0735410797e949E8D3e2AFCB9D2",
|
||||
DODOV2RouteHelper: "0x958f79e2998DFe417208b9A07D799265B0298e58",
|
||||
DODOV2RouteHelper: "0x324c747885a88EA6f8115C46E0605C828ed527D3",
|
||||
|
||||
//Template
|
||||
CloneFactory: "0x729f7f44bf64Ce814716b6261e267DbE6cdf021c",
|
||||
@@ -26,17 +26,17 @@ module.exports = {
|
||||
CustomERC20: "0xaF49DBAaf177beE57f84731260a9eb8819d25eff",
|
||||
|
||||
//Factory
|
||||
DVMFactory: "0xbAb9F4ff4A19a0e8EEBC56b06750253228ffAc6E",
|
||||
DPPFactory: "0xE55154D09265b18aC7CDAC6E646672A5460389a1",
|
||||
DSPFactory: "0xa356867fDCEa8e71AEaF87805808803806231FdC",
|
||||
UpCpFactory: "0x335aC99bb3E51BDbF22025f092Ebc1Cf2c5cC619",
|
||||
CrowdPoolingFactory: "0x85351262f7474Ebe23FfAcD633cf20A491F1325D",
|
||||
DVMFactory: "0x79887f65f83bdf15Bcc8736b5e5BcDB48fb8fE13",
|
||||
DPPFactory: "0x95E887aDF9EAa22cC1c6E3Cb7f07adC95b4b25a8",
|
||||
DSPFactory: "0x43C49f8DD240e1545F147211Ec9f917376Ac1e87",
|
||||
UpCpFactory: "0x326c788c4C236f2bceC9476C66F8593Aa31be4Fc",
|
||||
CrowdPoolingFactory: "0x42ddEc68db70F5992eB7AB22dfaD8A57109841C9",
|
||||
ERC20Factory: "0xaeB5CF31b97dce6134e416129845e01106fFB177",
|
||||
ERC20V2Factory: "0x8e2f666F316b614c76676215F16F0A9746f96a90",
|
||||
|
||||
//Approve
|
||||
DODOApprove: "0x9aE501385Bc7996A2A4a1FBb00c8d3820611BCB5",
|
||||
DODOApproveProxy: "0x738Ebf387A0CE0eb46b0eF8Fa5DEa2EaE6B1Df51",
|
||||
DODOApprove: "0x6D310348d5c12009854DFCf72e0DF9027e8cb4f4",
|
||||
DODOApproveProxy: "0x01FEEA29da5Ae41B0b5F6b10b93EE34752eF80d7",
|
||||
|
||||
//Adapter
|
||||
DODOV1Adapter: "0xB5397B2210f49e96a5EB2c9747Aa2bD9397d90C0",
|
||||
|
||||
@@ -1,177 +0,0 @@
|
||||
/*
|
||||
Copyright 2021 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
pragma solidity 0.6.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import {IERC20} from "../intf/IERC20.sol";
|
||||
import {SafeERC20} from "../lib/SafeERC20.sol";
|
||||
import {SafeMath} from "../lib/SafeMath.sol";
|
||||
import {InitializableOwnable} from "../lib/InitializableOwnable.sol";
|
||||
import {IDODOApproveProxy} from "../SmartRoute/DODOApproveProxy.sol";
|
||||
|
||||
interface IPrice {
|
||||
function getUserPrice(address mysteryBox, address user, uint256 originalPrice) external view returns (uint256);
|
||||
}
|
||||
|
||||
|
||||
contract BaseMysteryBox is InitializableOwnable {
|
||||
using SafeMath for uint256;
|
||||
using SafeERC20 for IERC20;
|
||||
|
||||
// ============ Storage ============
|
||||
address constant _BASE_COIN_ = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
||||
address public _BUY_TICKET_TOKEN_;
|
||||
address public _FEE_MODEL_;
|
||||
address public _DODO_APPROVE_PROXY_;
|
||||
uint256 [] public _PRICE_TIME_INTERVAL_;
|
||||
uint256 [] public _PRICE_SET_;
|
||||
uint256 [] public _SELLING_AMOUNT_SET_;
|
||||
|
||||
uint256 public _REDEEM_ALLOWED_TIME_;
|
||||
|
||||
mapping(address => uint256) public _USER_TICKETS_;
|
||||
uint256 public _TOTAL_TICKETS_;
|
||||
uint256 public _TICKET_UNIT_ = 1; // ticket consumed in a single lottery
|
||||
|
||||
bool public _IS_REVEAL_MODE_;
|
||||
uint256 public _REVEAL_RNG_ = 0;
|
||||
address public _RANDOM_GENERATOR_;
|
||||
|
||||
|
||||
// ============ Modifiers ============
|
||||
|
||||
modifier notStart() {
|
||||
require(block.timestamp < _PRICE_TIME_INTERVAL_[0] || _PRICE_TIME_INTERVAL_[0] == 0, "ALREADY_START");
|
||||
_;
|
||||
}
|
||||
|
||||
// ============ Event =============
|
||||
event BuyTicket(address account, uint256 value, uint256 tickets);
|
||||
event Withdraw(address account, uint256 amount);
|
||||
event ChangeRandomGenerator(address randomGenerator);
|
||||
event ChangeRedeemTime(uint256 redeemTime);
|
||||
event ChangeTicketUnit(uint256 newTicketUnit);
|
||||
event SetPriceInterval();
|
||||
event Transfer(address indexed from, address indexed to, uint256 amount);
|
||||
|
||||
|
||||
function _baseInit(
|
||||
address[] memory contractList, //0 owner, 1 buyTicketToken, 2 feeModel, 3 dodoApproveProxy 4 randomGenerator
|
||||
uint256[][] memory priceList, //0 priceTimeInterval, 1 priceSet, 2 sellAmount
|
||||
uint256 redeemAllowedTime,
|
||||
bool isRevealMode
|
||||
) public {
|
||||
initOwner(contractList[0]);
|
||||
_BUY_TICKET_TOKEN_ = contractList[1];
|
||||
_FEE_MODEL_ = contractList[2];
|
||||
_DODO_APPROVE_PROXY_ = contractList[3];
|
||||
_RANDOM_GENERATOR_ = contractList[4];
|
||||
|
||||
_REDEEM_ALLOWED_TIME_ = redeemAllowedTime;
|
||||
_IS_REVEAL_MODE_ = isRevealMode;
|
||||
if(priceList[0].length > 0) _setPrice(priceList[0], priceList[1], priceList[2]);
|
||||
}
|
||||
|
||||
function buyTickets(uint256 amount) payable external {
|
||||
uint256 curBlockTime = block.timestamp;
|
||||
require(curBlockTime >= _PRICE_TIME_INTERVAL_[0] && _PRICE_TIME_INTERVAL_[0] != 0, "NOT_START");
|
||||
uint256 i;
|
||||
for (i = 1; i < _PRICE_TIME_INTERVAL_.length; i++) {
|
||||
if (curBlockTime <= _PRICE_TIME_INTERVAL_[i]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
uint256 curSellAmount = _SELLING_AMOUNT_SET_[i-1];
|
||||
require(amount <= curSellAmount, "TICKETS_NOT_ENOUGH");
|
||||
uint256 buyPrice = IPrice(_FEE_MODEL_).getUserPrice(address(this), msg.sender, _PRICE_SET_[i-1]);
|
||||
require(buyPrice > 0, "UnQualified");
|
||||
uint256 payAmount = buyPrice.mul(amount);
|
||||
if(_BUY_TICKET_TOKEN_ == _BASE_COIN_) {
|
||||
require(msg.value >= payAmount,"BUY_TOKEN_NOT_ENOUGH");
|
||||
}else {
|
||||
IDODOApproveProxy(_DODO_APPROVE_PROXY_).claimTokens(_BUY_TICKET_TOKEN_, msg.sender, address(this), payAmount);
|
||||
}
|
||||
|
||||
_USER_TICKETS_[msg.sender] = _USER_TICKETS_[msg.sender].add(amount);
|
||||
_TOTAL_TICKETS_ = _TOTAL_TICKETS_.add(amount);
|
||||
_SELLING_AMOUNT_SET_[i - 1] = curSellAmount.sub(amount);
|
||||
|
||||
uint256 leftOver = msg.value - payAmount;
|
||||
if(leftOver > 0)
|
||||
msg.sender.transfer(leftOver);
|
||||
|
||||
emit BuyTicket(msg.sender, payAmount, amount);
|
||||
}
|
||||
|
||||
|
||||
function transferTickets(address to, uint256 amount) public returns (bool) {
|
||||
require(amount <= _USER_TICKETS_[msg.sender], "TICKET_NOT_ENOUGH");
|
||||
|
||||
_USER_TICKETS_[msg.sender] = _USER_TICKETS_[msg.sender].sub(amount);
|
||||
_USER_TICKETS_[to] = _USER_TICKETS_[to].add(amount);
|
||||
emit Transfer(msg.sender, to, amount);
|
||||
return true;
|
||||
}
|
||||
|
||||
// ================= View ===================
|
||||
function getTickets(address account) view external returns(uint256) {
|
||||
return _USER_TICKETS_[account];
|
||||
}
|
||||
|
||||
// ============ Internal ============
|
||||
|
||||
function _setPrice(uint256[] memory priceIntervals, uint256[] memory prices, uint256[] memory amounts) internal {
|
||||
require(priceIntervals.length == prices.length && prices.length == amounts.length, "PARAM_NOT_INVALID");
|
||||
for (uint256 i = 0; i < priceIntervals.length - 1; i++) {
|
||||
require(priceIntervals[i] < priceIntervals[i + 1], "INTERVAL_INVALID");
|
||||
require(prices[i] != 0, "INTERVAL_INVALID");
|
||||
require(amounts[i] != 0, "INTERVAL_INVALID");
|
||||
}
|
||||
_PRICE_TIME_INTERVAL_ = priceIntervals;
|
||||
_PRICE_SET_ = prices;
|
||||
_SELLING_AMOUNT_SET_ = amounts;
|
||||
emit SetPriceInterval();
|
||||
}
|
||||
|
||||
// ================= Owner ===================
|
||||
function withdraw() external onlyOwner {
|
||||
uint256 amount;
|
||||
if(_BASE_COIN_ == _BUY_TICKET_TOKEN_) {
|
||||
amount = address(this).balance;
|
||||
msg.sender.transfer(amount);
|
||||
}else {
|
||||
amount = IERC20(_BUY_TICKET_TOKEN_).balanceOf(address(this));
|
||||
IERC20(_BUY_TICKET_TOKEN_).safeTransfer(msg.sender, amount);
|
||||
}
|
||||
emit Withdraw(msg.sender, amount);
|
||||
}
|
||||
|
||||
function setRevealRng() external onlyOwner {
|
||||
require(_REVEAL_RNG_ == 0, "ALREADY_SET");
|
||||
_REVEAL_RNG_ = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1))));
|
||||
}
|
||||
|
||||
function setPrice(uint256[] memory priceIntervals, uint256[] memory prices, uint256[] memory amounts) external notStart() onlyOwner {
|
||||
_setPrice(priceIntervals, prices, amounts);
|
||||
}
|
||||
|
||||
function updateRandomGenerator(address newRandomGenerator) external onlyOwner {
|
||||
require(newRandomGenerator != address(0));
|
||||
_RANDOM_GENERATOR_ = newRandomGenerator;
|
||||
emit ChangeRandomGenerator(newRandomGenerator);
|
||||
}
|
||||
|
||||
function updateTicketUnit(uint256 newTicketUnit) external onlyOwner {
|
||||
require(newTicketUnit != 0);
|
||||
_TICKET_UNIT_ = newTicketUnit;
|
||||
emit ChangeTicketUnit(newTicketUnit);
|
||||
}
|
||||
|
||||
function updateRedeemTime(uint256 newRedeemTime) external onlyOwner {
|
||||
require(newRedeemTime > block.timestamp || newRedeemTime == 0, "PARAM_NOT_INVALID");
|
||||
_REDEEM_ALLOWED_TIME_ = newRedeemTime;
|
||||
emit ChangeRedeemTime(newRedeemTime);
|
||||
}
|
||||
}
|
||||
@@ -1,122 +0,0 @@
|
||||
/*
|
||||
Copyright 2021 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
pragma solidity 0.6.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import {IERC20} from "../intf/IERC20.sol";
|
||||
import {SafeERC20} from "../lib/SafeERC20.sol";
|
||||
import {SafeMath} from "../lib/SafeMath.sol";
|
||||
import {Address} from "../external/utils/Address.sol";
|
||||
import {IRandomGenerator} from "../lib/RandomGenerator.sol";
|
||||
import {ERC1155} from "../external/ERC1155/ERC1155.sol";
|
||||
import {BaseMysteryBox} from "./BaseMysteryBox.sol";
|
||||
|
||||
//讨论:tokenId 与 ipfs 的 uri 关联关系
|
||||
contract MysteryBoxV2 is BaseMysteryBox, ERC1155 {
|
||||
using SafeMath for uint256;
|
||||
using SafeERC20 for IERC20;
|
||||
using Address for address;
|
||||
|
||||
// ============ Storage ============
|
||||
|
||||
uint256[] public _PROB_INTERVAL_; // index => Interval probability
|
||||
uint256[][] public _TOKEN_ID_SET_; // Interval index => tokenIds
|
||||
|
||||
// ============ Event =============
|
||||
event RedeemPrize(address account, uint256 tokenId);
|
||||
|
||||
event SetProbInterval();
|
||||
event SetTokenIds();
|
||||
event SetTokenIdByIndex(uint256 index);
|
||||
|
||||
|
||||
function init(
|
||||
address[] memory contractList, //0 owner, 1 buyTicketToken, 2 feeModel, 3 dodoApproveProxy 4 randomGenerator
|
||||
uint256[][] memory priceList, //0 priceTimeInterval, 1 priceSet, 2 sellAmount
|
||||
uint256 redeemAllowedTime,
|
||||
bool isRevealMode,
|
||||
string memory baseUri,
|
||||
uint256[] memory probIntervals,
|
||||
uint256[][] memory tokenIds
|
||||
) public {
|
||||
super._baseInit(contractList,priceList,redeemAllowedTime,isRevealMode);
|
||||
_setURI(baseUri);
|
||||
if(probIntervals.length > 0) _setProbInterval(probIntervals);
|
||||
if(tokenIds.length > 0) _setTokenIds(tokenIds);
|
||||
}
|
||||
|
||||
function redeemTicket(uint256 ticketNum) external {
|
||||
require(!address(msg.sender).isContract(), "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);
|
||||
for (uint256 i = 0; i < ticketNum; i++) {
|
||||
_redeemSinglePrize(msg.sender, i);
|
||||
}
|
||||
}
|
||||
|
||||
// ============ Internal ============
|
||||
|
||||
function _redeemSinglePrize(address to, uint256 curNo) internal {
|
||||
require(block.timestamp >= _REDEEM_ALLOWED_TIME_ && _REDEEM_ALLOWED_TIME_ != 0, "REDEEM_CLOSE");
|
||||
uint256 range = _PROB_INTERVAL_[_PROB_INTERVAL_.length - 1];
|
||||
uint256 random;
|
||||
if(_IS_REVEAL_MODE_) {
|
||||
require(_REVEAL_RNG_ != 0, "REVEAL_NOT_SET");
|
||||
random = uint256(keccak256(abi.encodePacked(_REVEAL_RNG_, msg.sender, _USER_TICKETS_[msg.sender].add(curNo + 1)))) % range;
|
||||
}else {
|
||||
random = IRandomGenerator(_RANDOM_GENERATOR_).random(gasleft()) % range;
|
||||
}
|
||||
uint256 i;
|
||||
for (i = 0; i < _PROB_INTERVAL_.length; i++) {
|
||||
if (random <= _PROB_INTERVAL_[i]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
require(_TOKEN_ID_SET_[i].length > 0, "EMPTY_TOKEN_ID_SET");
|
||||
uint256 tokenId = _TOKEN_ID_SET_[i][random % _TOKEN_ID_SET_[i].length];
|
||||
_mint(to, tokenId, 1, "");
|
||||
emit RedeemPrize(to, tokenId);
|
||||
}
|
||||
|
||||
function _setProbInterval(uint256[] memory probIntervals) internal {
|
||||
require(probIntervals.length > 0, "PARAM_NOT_INVALID");
|
||||
for (uint256 i = 1; i < probIntervals.length; i++) {
|
||||
require(probIntervals[i] > probIntervals[i - 1], "INTERVAL_INVALID");
|
||||
}
|
||||
_PROB_INTERVAL_ = probIntervals;
|
||||
emit SetProbInterval();
|
||||
}
|
||||
|
||||
function _setTokenIds(uint256[][] memory tokenIds) internal {
|
||||
require(tokenIds.length == _PROB_INTERVAL_.length, "PARAM_NOT_INVALID");
|
||||
for (uint256 i = 0; i < tokenIds.length; i++) {
|
||||
require(tokenIds[i].length > 0, "INVALID");
|
||||
}
|
||||
_TOKEN_ID_SET_ = tokenIds;
|
||||
emit SetTokenIds();
|
||||
}
|
||||
|
||||
// ================= Owner ===================
|
||||
function redeemByOwner(uint256 ticketNum) external onlyOwner {
|
||||
for (uint256 i = 0; i < ticketNum; i++) {
|
||||
_redeemSinglePrize(msg.sender, i);
|
||||
}
|
||||
}
|
||||
|
||||
function setProbInterval(uint256[] memory probIntervals) external notStart() onlyOwner {
|
||||
_setProbInterval(probIntervals);
|
||||
}
|
||||
|
||||
function setTokenIds(uint256[][] memory tokenIds) external notStart() onlyOwner {
|
||||
_setTokenIds(tokenIds);
|
||||
}
|
||||
|
||||
function setTokenIdByIndex(uint256 index, uint256[] memory tokenIds) external notStart() onlyOwner {
|
||||
require(tokenIds.length > 0 && index < _TOKEN_ID_SET_.length,"PARAM_NOT_INVALID");
|
||||
_TOKEN_ID_SET_[index] = tokenIds;
|
||||
emit SetTokenIdByIndex(index);
|
||||
}
|
||||
}
|
||||
312
contracts/DODOMysteryBox/MysteryBoxV2/BaseMysteryBox.sol
Normal file
312
contracts/DODOMysteryBox/MysteryBoxV2/BaseMysteryBox.sol
Normal file
@@ -0,0 +1,312 @@
|
||||
/*
|
||||
Copyright 2021 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
pragma solidity 0.6.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import {IERC20} from "../../intf/IERC20.sol";
|
||||
import {DecimalMath} from "../../lib/DecimalMath.sol";
|
||||
import {UniversalERC20} from "../../SmartRoute/lib/UniversalERC20.sol";
|
||||
import {SafeMath} from "../../lib/SafeMath.sol";
|
||||
import {Address} from "../../external/utils/Address.sol";
|
||||
import {ReentrancyGuard} from "../../lib/ReentrancyGuard.sol";
|
||||
import {IRandomGenerator} from "../../lib/RandomGenerator.sol";
|
||||
import {InitializableOwnable} from "../../lib/InitializableOwnable.sol";
|
||||
import {InitializableERC20} from "../../external/ERC20/InitializableERC20.sol";
|
||||
|
||||
interface IMysteryBoxPay {
|
||||
function getPayAmount(address mysteryBox, address user, uint256 originalPrice, uint256 ticketAmount) external view returns (uint256, uint256);
|
||||
}
|
||||
|
||||
interface IMysteryBoxNft {
|
||||
function mint(address to, uint256 tokenId) external;
|
||||
function mint(address account, uint256 id, uint256 amount, bytes memory data) external;
|
||||
}
|
||||
|
||||
contract BaseMysteryBox is InitializableERC20, InitializableOwnable, ReentrancyGuard {
|
||||
using SafeMath for uint256;
|
||||
using Address for address;
|
||||
using UniversalERC20 for IERC20;
|
||||
|
||||
// ============ Storage ============
|
||||
address constant _BASE_COIN_ = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
||||
|
||||
address public _BUY_TOKEN_;
|
||||
uint256 public _BUY_RESERVE_;
|
||||
address public _FEE_MODEL_;
|
||||
address payable public _DEFAULT_MAINTAINER_;
|
||||
address public _NFT_TOKEN_;
|
||||
|
||||
uint256 public _TICKET_UNIT_ = 1; // ticket consumed in a single lottery
|
||||
|
||||
uint256 [] public _PRICE_TIME_INTERVAL_;
|
||||
uint256 [] public _PRICE_SET_;
|
||||
uint256 [] public _SELLING_AMOUNT_SET_;
|
||||
uint256 public _REDEEM_ALLOWED_TIME_;
|
||||
|
||||
uint256[] public _BOX_INTERVAL_; // index => Interval probability (For ProbMode) index => tokenId (For FixedAmount mode)
|
||||
uint256[][] public _TOKEN_ID_SET_; // Interval index => tokenIds (For ProbMode)
|
||||
|
||||
bool public _IS_PROB_MODE; // false FixedAmount true ProbMode
|
||||
bool public _IS_REVEAL_MODE_;
|
||||
uint256 public _REVEAL_RNG_ = 0;
|
||||
address public _RANDOM_GENERATOR_;
|
||||
|
||||
fallback() external payable {}
|
||||
|
||||
receive() external payable {}
|
||||
|
||||
// ============ Modifiers ============
|
||||
|
||||
modifier notStart() {
|
||||
require(block.timestamp < _PRICE_TIME_INTERVAL_[0] || _PRICE_TIME_INTERVAL_[0] == 0, "ALREADY_START");
|
||||
_;
|
||||
}
|
||||
|
||||
// ============ Event =============
|
||||
event BuyTicket(address account, uint256 payAmount, uint256 feeAmount, uint256 ticketAmount);
|
||||
event RedeemPrize(address account, uint256 tokenId, address referer);
|
||||
|
||||
event ChangeRandomGenerator(address randomGenerator);
|
||||
event ChangeRedeemTime(uint256 redeemTime);
|
||||
event ChangeTicketUnit(uint256 newTicketUnit);
|
||||
event Withdraw(address account, uint256 amount);
|
||||
|
||||
event SetPriceInterval();
|
||||
event SetBoxInterval();
|
||||
event SetTokenIds();
|
||||
event SetTokenIdByIndex(uint256 index);
|
||||
|
||||
|
||||
function init(
|
||||
address[] memory contractList, //0 owner, 1 buyToken, 2 feeModel, 3 defaultMaintainer 4 randomGenerator 5 nftToken
|
||||
uint256[][] memory priceList, //0 priceTimeInterval, 1 priceSet, 2 sellAmount
|
||||
uint256[] memory boxIntervals,
|
||||
uint256[][] memory tokenIds,
|
||||
uint256 redeemAllowedTime,
|
||||
bool isRevealMode,
|
||||
bool isProbMode,
|
||||
uint256 totalTickets
|
||||
) public {
|
||||
initOwner(contractList[0]);
|
||||
_BUY_TOKEN_ = contractList[1];
|
||||
_FEE_MODEL_ = contractList[2];
|
||||
_DEFAULT_MAINTAINER_ = payable(contractList[3]);
|
||||
_RANDOM_GENERATOR_ = contractList[4];
|
||||
_NFT_TOKEN_ = contractList[5];
|
||||
|
||||
_REDEEM_ALLOWED_TIME_ = redeemAllowedTime;
|
||||
if(priceList.length > 0) _setPrice(priceList[0], priceList[1], priceList[2]);
|
||||
|
||||
_IS_REVEAL_MODE_ = isRevealMode;
|
||||
_IS_PROB_MODE = isProbMode;
|
||||
if(boxIntervals.length > 0) _setBoxInterval(boxIntervals);
|
||||
if(tokenIds.length > 0 && isProbMode) _setTokenIds(tokenIds);
|
||||
|
||||
// init TICKET
|
||||
string memory prefix = "DROPS_";
|
||||
name = string(abi.encodePacked(prefix, addressToShortString(address(this))));
|
||||
symbol = name;
|
||||
decimals = 0;
|
||||
super.init(address(this), totalTickets, name, symbol, decimals);
|
||||
}
|
||||
|
||||
function buyTickets(address assetTo, uint256 ticketAmount) payable external preventReentrant {
|
||||
(uint256 curPrice, uint256 sellAmount, uint256 index) = getPriceAndSellAmount();
|
||||
require(curPrice > 0 && sellAmount > 0, "CAN_NOT_BUY");
|
||||
require(ticketAmount <= sellAmount, "TICKETS_NOT_ENOUGH");
|
||||
(uint256 payAmount, uint256 feeAmount) = IMysteryBoxPay(_FEE_MODEL_).getPayAmount(address(this), assetTo, curPrice, ticketAmount);
|
||||
require(payAmount > 0, "UnQualified");
|
||||
|
||||
uint256 baseBalance = IERC20(_BUY_TOKEN_).universalBalanceOf(address(this));
|
||||
uint256 buyInput = baseBalance.sub(_BUY_RESERVE_);
|
||||
|
||||
require(payAmount <= buyInput, "PAY_AMOUNT_NOT_ENOUGH");
|
||||
|
||||
_SELLING_AMOUNT_SET_[index] = sellAmount.sub(ticketAmount);
|
||||
_BUY_RESERVE_ = baseBalance.sub(feeAmount);
|
||||
|
||||
IERC20(_BUY_TOKEN_).universalTransfer(_DEFAULT_MAINTAINER_,feeAmount);
|
||||
_transfer(address(this), assetTo, ticketAmount);
|
||||
emit BuyTicket(assetTo, payAmount, feeAmount, ticketAmount);
|
||||
}
|
||||
|
||||
function redeemTicket(uint256 ticketNum, address referer) external {
|
||||
require(!address(msg.sender).isContract(), "ONLY_ALLOW_EOA");
|
||||
require(ticketNum >= 1 && ticketNum <= balanceOf(msg.sender), "TICKET_NUM_INVALID");
|
||||
balances[msg.sender] = balances[msg.sender].sub(ticketNum);
|
||||
balances[address(0)] = balances[address(0)].add(ticketNum);
|
||||
|
||||
emit Transfer(msg.sender, address(0), ticketNum);
|
||||
|
||||
for (uint256 i = 0; i < ticketNum; i++) {
|
||||
_redeemSinglePrize(msg.sender, i, referer);
|
||||
}
|
||||
}
|
||||
|
||||
// ============ Internal ============
|
||||
|
||||
function _redeemSinglePrize(address to, uint256 curNo, address referer) internal {
|
||||
require(block.timestamp >= _REDEEM_ALLOWED_TIME_ && _REDEEM_ALLOWED_TIME_ != 0, "REDEEM_CLOSE");
|
||||
uint256 range;
|
||||
if(_IS_PROB_MODE) {
|
||||
range = _BOX_INTERVAL_[_BOX_INTERVAL_.length - 1];
|
||||
}else {
|
||||
range = _BOX_INTERVAL_.length;
|
||||
}
|
||||
uint256 random;
|
||||
if(_IS_REVEAL_MODE_) {
|
||||
require(_REVEAL_RNG_ != 0, "REVEAL_NOT_SET");
|
||||
random = uint256(keccak256(abi.encodePacked(_REVEAL_RNG_, msg.sender, balanceOf(msg.sender).add(curNo + 1)))) % range;
|
||||
}else {
|
||||
random = IRandomGenerator(_RANDOM_GENERATOR_).random(gasleft() + block.number) % range;
|
||||
}
|
||||
uint256 tokenId;
|
||||
if(_IS_PROB_MODE) {
|
||||
uint256 i;
|
||||
for (i = 0; i < _BOX_INTERVAL_.length; i++) {
|
||||
if (random <= _BOX_INTERVAL_[i]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
require(_TOKEN_ID_SET_[i].length > 0, "EMPTY_TOKEN_ID_SET");
|
||||
tokenId = _TOKEN_ID_SET_[i][random % _TOKEN_ID_SET_[i].length];
|
||||
IMysteryBoxNft(_NFT_TOKEN_).mint(to, tokenId, 1, "");
|
||||
} else {
|
||||
tokenId = _BOX_INTERVAL_[random];
|
||||
if(random != range - 1) {
|
||||
_BOX_INTERVAL_[random] = _BOX_INTERVAL_[range - 1];
|
||||
}
|
||||
_BOX_INTERVAL_.pop();
|
||||
IMysteryBoxNft(_NFT_TOKEN_).mint(to, tokenId);
|
||||
}
|
||||
emit RedeemPrize(to, tokenId, referer);
|
||||
}
|
||||
|
||||
|
||||
function _setPrice(uint256[] memory priceIntervals, uint256[] memory prices, uint256[] memory amounts) internal {
|
||||
require(priceIntervals.length == prices.length && prices.length == amounts.length, "PARAM_NOT_INVALID");
|
||||
for (uint256 i = 0; i < priceIntervals.length - 1; i++) {
|
||||
require(priceIntervals[i] < priceIntervals[i + 1], "INTERVAL_INVALID");
|
||||
require(prices[i] != 0, "INTERVAL_INVALID");
|
||||
require(amounts[i] != 0, "INTERVAL_INVALID");
|
||||
}
|
||||
_PRICE_TIME_INTERVAL_ = priceIntervals;
|
||||
_PRICE_SET_ = prices;
|
||||
_SELLING_AMOUNT_SET_ = amounts;
|
||||
emit SetPriceInterval();
|
||||
}
|
||||
|
||||
function _setBoxInterval(uint256[] memory boxIntervals) internal {
|
||||
require(boxIntervals.length > 0, "PARAM_NOT_INVALID");
|
||||
if(_IS_PROB_MODE) {
|
||||
for (uint256 i = 1; i < boxIntervals.length; i++) {
|
||||
require(boxIntervals[i] > boxIntervals[i - 1], "INTERVAL_INVALID");
|
||||
}
|
||||
}
|
||||
_BOX_INTERVAL_ = boxIntervals;
|
||||
emit SetBoxInterval();
|
||||
}
|
||||
|
||||
function _setTokenIds(uint256[][] memory tokenIds) internal {
|
||||
require(tokenIds.length == _BOX_INTERVAL_.length, "PARAM_NOT_INVALID");
|
||||
require(_IS_PROB_MODE, "ONLY_ALLOW_PROB_MODE");
|
||||
for (uint256 i = 0; i < tokenIds.length; i++) {
|
||||
require(tokenIds[i].length > 0, "INVALID");
|
||||
}
|
||||
_TOKEN_ID_SET_ = tokenIds;
|
||||
emit SetTokenIds();
|
||||
}
|
||||
|
||||
// ================= Owner ===================
|
||||
|
||||
function withdraw() external onlyOwner {
|
||||
uint256 amount = IERC20(_BUY_TOKEN_).universalBalanceOf(address(this));
|
||||
IERC20(_BUY_TOKEN_).universalTransfer(msg.sender ,amount);
|
||||
emit Withdraw(msg.sender, amount);
|
||||
}
|
||||
|
||||
function redeemByOwner(uint256 ticketNum, address referer) external onlyOwner {
|
||||
require(ticketNum >= 1 && ticketNum <= balanceOf(address(this)), "TICKET_NUM_INVALID");
|
||||
balances[address(this)] = balances[address(this)].sub(ticketNum);
|
||||
balances[address(0)] = balances[address(0)].add(ticketNum);
|
||||
|
||||
emit Transfer(address(this), address(0), ticketNum);
|
||||
|
||||
for (uint256 i = 0; i < ticketNum; i++) {
|
||||
_redeemSinglePrize(msg.sender, i, referer);
|
||||
}
|
||||
}
|
||||
|
||||
function setRevealRng() external onlyOwner {
|
||||
require(_REVEAL_RNG_ == 0, "ALREADY_SET");
|
||||
_REVEAL_RNG_ = uint256(keccak256(abi.encodePacked(blockhash(block.number - 1))));
|
||||
}
|
||||
|
||||
function setPrice(uint256[] memory priceIntervals, uint256[] memory prices, uint256[] memory amounts) external notStart() onlyOwner {
|
||||
_setPrice(priceIntervals, prices, amounts);
|
||||
}
|
||||
|
||||
function setBoxInterval(uint256[] memory boxIntervals) external notStart() onlyOwner {
|
||||
_setBoxInterval(boxIntervals);
|
||||
}
|
||||
|
||||
function setTokenIds(uint256[][] memory tokenIds) external notStart() onlyOwner {
|
||||
_setTokenIds(tokenIds);
|
||||
}
|
||||
|
||||
function setTokenIdByIndex(uint256 index, uint256[] memory tokenIds) external notStart() onlyOwner {
|
||||
require(tokenIds.length > 0 && index < _TOKEN_ID_SET_.length,"PARAM_NOT_INVALID");
|
||||
require(_IS_PROB_MODE, "ONLY_ALLOW_PROB_MODE");
|
||||
_TOKEN_ID_SET_[index] = tokenIds;
|
||||
emit SetTokenIdByIndex(index);
|
||||
}
|
||||
|
||||
function updateRandomGenerator(address newRandomGenerator) external onlyOwner {
|
||||
require(newRandomGenerator != address(0));
|
||||
_RANDOM_GENERATOR_ = newRandomGenerator;
|
||||
emit ChangeRandomGenerator(newRandomGenerator);
|
||||
}
|
||||
|
||||
function updateTicketUnit(uint256 newTicketUnit) external onlyOwner {
|
||||
require(newTicketUnit != 0);
|
||||
_TICKET_UNIT_ = newTicketUnit;
|
||||
emit ChangeTicketUnit(newTicketUnit);
|
||||
}
|
||||
|
||||
function updateRedeemTime(uint256 newRedeemTime) external onlyOwner {
|
||||
require(newRedeemTime > block.timestamp || newRedeemTime == 0, "PARAM_NOT_INVALID");
|
||||
_REDEEM_ALLOWED_TIME_ = newRedeemTime;
|
||||
emit ChangeRedeemTime(newRedeemTime);
|
||||
}
|
||||
|
||||
// ================= View ===================
|
||||
|
||||
function getPriceAndSellAmount() public view returns (uint256 curPrice, uint256 sellAmount, uint256 index) {
|
||||
uint256 curBlockTime = block.timestamp;
|
||||
if(curBlockTime >= _PRICE_TIME_INTERVAL_[0] && _PRICE_TIME_INTERVAL_[0] != 0) {
|
||||
uint256 i;
|
||||
for (i = 1; i < _PRICE_TIME_INTERVAL_.length; i++) {
|
||||
if (curBlockTime <= _PRICE_TIME_INTERVAL_[i]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
sellAmount = _SELLING_AMOUNT_SET_[i-1];
|
||||
curPrice = _PRICE_SET_[i-1];
|
||||
index = i - 1;
|
||||
}
|
||||
}
|
||||
|
||||
function addressToShortString(address _addr) public pure returns (string memory) {
|
||||
bytes32 value = bytes32(uint256(_addr));
|
||||
bytes memory alphabet = "0123456789abcdef";
|
||||
|
||||
bytes memory str = new bytes(8);
|
||||
for (uint256 i = 0; i < 4; i++) {
|
||||
str[i * 2] = alphabet[uint8(value[i + 12] >> 4)];
|
||||
str[1 + i * 2] = alphabet[uint8(value[i + 12] & 0x0f)];
|
||||
}
|
||||
return string(str);
|
||||
}
|
||||
}
|
||||
36
contracts/DODOMysteryBox/MysteryBoxV2/MysteryBoxERC1155.sol
Normal file
36
contracts/DODOMysteryBox/MysteryBoxV2/MysteryBoxERC1155.sol
Normal file
@@ -0,0 +1,36 @@
|
||||
/*
|
||||
|
||||
Copyright 2020 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity 0.6.9;
|
||||
|
||||
import {ERC1155} from "../../external/ERC1155/ERC1155.sol";
|
||||
import {InitializableOwnable} from "../../lib/InitializableOwnable.sol";
|
||||
|
||||
contract MysteryBoxERC1155 is ERC1155,InitializableOwnable {
|
||||
mapping (address => bool) public _IS_ALLOWED_MINT_;
|
||||
|
||||
function addMintAccount(address account) public onlyOwner {
|
||||
_IS_ALLOWED_MINT_[account] = true;
|
||||
}
|
||||
|
||||
function removeMintAccount(address account) public onlyOwner {
|
||||
_IS_ALLOWED_MINT_[account] = false;
|
||||
}
|
||||
|
||||
function init(
|
||||
address owner,
|
||||
string memory uri
|
||||
) public {
|
||||
initOwner(owner);
|
||||
_setURI(uri);
|
||||
}
|
||||
|
||||
function mint(address account, uint256 id, uint256 amount, bytes memory data) external {
|
||||
require(_IS_ALLOWED_MINT_[msg.sender], "Mint restricted");
|
||||
_mint(account, id, amount, data);
|
||||
}
|
||||
}
|
||||
40
contracts/DODOMysteryBox/MysteryBoxV2/MysteryBoxERC721.sol
Normal file
40
contracts/DODOMysteryBox/MysteryBoxV2/MysteryBoxERC721.sol
Normal file
@@ -0,0 +1,40 @@
|
||||
/*
|
||||
|
||||
Copyright 2021 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity 0.6.9;
|
||||
|
||||
import {ERC721} from "../../external/ERC721/ERC721.sol";
|
||||
import {InitializableOwnable} from "../../lib/InitializableOwnable.sol";
|
||||
|
||||
contract MysteryBoxERC721 is ERC721,InitializableOwnable {
|
||||
mapping (address => bool) public _IS_ALLOWED_MINT_;
|
||||
|
||||
function addMintAccount(address account) public onlyOwner {
|
||||
_IS_ALLOWED_MINT_[account] = true;
|
||||
}
|
||||
|
||||
function removeMintAccount(address account) public onlyOwner {
|
||||
_IS_ALLOWED_MINT_[account] = false;
|
||||
}
|
||||
|
||||
function init(
|
||||
address owner,
|
||||
string memory name,
|
||||
string memory symbol,
|
||||
string memory uri
|
||||
) public {
|
||||
initOwner(owner);
|
||||
_name = name;
|
||||
_symbol = symbol;
|
||||
_baseUri = uri;
|
||||
}
|
||||
|
||||
function mint(address to, uint256 tokenId) external {
|
||||
require(_IS_ALLOWED_MINT_[msg.sender], "Mint restricted");
|
||||
_mint(to, tokenId);
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
/*
|
||||
Copyright 2021 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
pragma solidity 0.6.9;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
import {IERC20} from "../intf/IERC20.sol";
|
||||
import {SafeERC20} from "../lib/SafeERC20.sol";
|
||||
import {SafeMath} from "../lib/SafeMath.sol";
|
||||
import {IRandomGenerator} from "../lib/RandomGenerator.sol";
|
||||
import {InitializableOwnable} from "../lib/InitializableOwnable.sol";
|
||||
import {Address} from "../external/utils/Address.sol";
|
||||
import {ERC721} from "../external/ERC721/ERC721.sol";
|
||||
import {BaseMysteryBox} from "./BaseMysteryBox.sol";
|
||||
|
||||
contract MysteryBoxV3 is BaseMysteryBox, ERC721 {
|
||||
using SafeMath for uint256;
|
||||
using SafeERC20 for IERC20;
|
||||
using Address for address;
|
||||
|
||||
// ============ Storage ============
|
||||
uint256[] public _TOKEN_IDS_;
|
||||
|
||||
// ============ Event =============
|
||||
event RedeemPrize(address account, uint256 tokenId);
|
||||
event SetTokenIds();
|
||||
|
||||
function init(
|
||||
address[] memory contractList, //0 owner, 1 buyTicketToken, 2 feeModel, 3 dodoApproveProxy 4 randomGenerator
|
||||
uint256[][] memory priceList, //0 priceTimeInterval, 1 priceSet, 2 sellAmount
|
||||
uint256 redeemAllowedTime,
|
||||
bool isRevealMode,
|
||||
string memory name,
|
||||
string memory symbol,
|
||||
string memory baseUri,
|
||||
uint256[] memory tokenIds
|
||||
) public {
|
||||
super._baseInit(contractList,priceList,redeemAllowedTime,isRevealMode);
|
||||
_name = name;
|
||||
_symbol = symbol;
|
||||
_baseUri = baseUri;
|
||||
if(tokenIds.length > 0) _setTokenIds(tokenIds);
|
||||
}
|
||||
|
||||
function redeemPrize(uint256 ticketNum) external {
|
||||
require(!address(msg.sender).isContract(), "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);
|
||||
for (uint256 i = 0; i < ticketNum; i++) {
|
||||
_redeemSinglePrize(msg.sender, i);
|
||||
}
|
||||
}
|
||||
|
||||
// =============== Internal ================
|
||||
function _redeemSinglePrize(address to, uint256 curNo) internal {
|
||||
require(block.timestamp >= _REDEEM_ALLOWED_TIME_ && _REDEEM_ALLOWED_TIME_ != 0, "REDEEM_CLOSE");
|
||||
uint256 range = _TOKEN_IDS_.length;
|
||||
uint256 random;
|
||||
if(_IS_REVEAL_MODE_) {
|
||||
require(_REVEAL_RNG_ != 0, "REVEAL_NOT_SET");
|
||||
random = uint256(keccak256(abi.encodePacked(_REVEAL_RNG_, msg.sender, _USER_TICKETS_[msg.sender].add(curNo + 1)))) % range;
|
||||
}else {
|
||||
random = IRandomGenerator(_RANDOM_GENERATOR_).random(gasleft()) % range;
|
||||
}
|
||||
uint256 tokenId = _TOKEN_IDS_[random];
|
||||
|
||||
if(random != range - 1) {
|
||||
_TOKEN_IDS_[random] = _TOKEN_IDS_[range - 1];
|
||||
}
|
||||
_TOKEN_IDS_.pop();
|
||||
_mint(to, tokenId);
|
||||
emit RedeemPrize(to, tokenId);
|
||||
}
|
||||
|
||||
function _setTokenIds(uint256[] memory ids) internal {
|
||||
require(ids.length > 0, "PARAM_NOT_INVALID");
|
||||
_TOKEN_IDS_ = ids;
|
||||
}
|
||||
|
||||
// ================= Owner ===================
|
||||
function redeemByOwner(uint256 ticketNum) external onlyOwner {
|
||||
for (uint256 i = 0; i < ticketNum; i++) {
|
||||
_redeemSinglePrize(msg.sender, i);
|
||||
}
|
||||
}
|
||||
|
||||
function setTokenIds(uint256[] memory ids) external notStart() onlyOwner {
|
||||
_setTokenIds(ids);
|
||||
emit SetTokenIds();
|
||||
}
|
||||
}
|
||||
78
contracts/SmartRoute/proxies/DODOMysteryBoxProxy.sol
Normal file
78
contracts/SmartRoute/proxies/DODOMysteryBoxProxy.sol
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
/*
|
||||
Copyright 2020 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
pragma solidity 0.6.9;
|
||||
|
||||
import {IDODOApproveProxy} from "../DODOApproveProxy.sol";
|
||||
import {IERC20} from "../../intf/IERC20.sol";
|
||||
import {IWETH} from "../../intf/IWETH.sol";
|
||||
import {SafeMath} from "../../lib/SafeMath.sol";
|
||||
import {SafeERC20} from "../../lib/SafeERC20.sol";
|
||||
import {ReentrancyGuard} from "../../lib/ReentrancyGuard.sol";
|
||||
|
||||
interface IDODOMysteryBox {
|
||||
function _BUY_TOKEN_() external view returns (address);
|
||||
function _FEE_MODEL_() external view returns (address);
|
||||
function getPriceAndSellAmount() external view returns (uint256, uint256, uint256);
|
||||
function buyTickets(address assetTo, uint256 ticketAmount) external;
|
||||
}
|
||||
|
||||
interface IMysteryBoxPay {
|
||||
function getPayAmount(address mysteryBox, address user, uint256 originalPrice, uint256 ticketAmount) external view returns (uint256, uint256);
|
||||
}
|
||||
|
||||
/**
|
||||
* @title DODO MysteryBoxProxy
|
||||
* @author DODO Breeder
|
||||
*
|
||||
* @notice Entrance of MysteryBox in DODO platform
|
||||
*/
|
||||
contract DODOMysteryBoxProxy is ReentrancyGuard {
|
||||
using SafeMath for uint256;
|
||||
|
||||
// ============ Storage ============
|
||||
|
||||
address constant _ETH_ADDRESS_ = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
||||
address public immutable _WETH_;
|
||||
address public immutable _DODO_APPROVE_PROXY_;
|
||||
|
||||
// ============ Events ============
|
||||
event BuyTicket(address indexed account, address indexed mysteryBox, uint256 ticketAmount);
|
||||
|
||||
fallback() external payable {}
|
||||
|
||||
receive() external payable {}
|
||||
|
||||
constructor(
|
||||
address payable weth,
|
||||
address dodoApproveProxy
|
||||
) public {
|
||||
_WETH_ = weth;
|
||||
_DODO_APPROVE_PROXY_ = dodoApproveProxy;
|
||||
}
|
||||
|
||||
function buyTickets(address payable dodoMysteryBox, uint256 ticketAmount) external payable preventReentrant {
|
||||
(uint256 curPrice, uint256 sellAmount,) = IDODOMysteryBox(dodoMysteryBox).getPriceAndSellAmount();
|
||||
require(curPrice > 0 && sellAmount > 0, "CAN_NOT_BUY");
|
||||
require(ticketAmount <= sellAmount, "TICKETS_NOT_ENOUGH");
|
||||
|
||||
address feeModel = IDODOMysteryBox(dodoMysteryBox)._FEE_MODEL_();
|
||||
(uint256 payAmount,) = IMysteryBoxPay(feeModel).getPayAmount(dodoMysteryBox, msg.sender, curPrice, ticketAmount);
|
||||
require(payAmount > 0, "UnQualified");
|
||||
address buyToken = IDODOMysteryBox(dodoMysteryBox)._BUY_TOKEN_();
|
||||
|
||||
if(buyToken == _ETH_ADDRESS_) {
|
||||
require(msg.value >= payAmount, "PAYAMOUNT_NOT_ENOUGH");
|
||||
dodoMysteryBox.transfer(payAmount);
|
||||
}else {
|
||||
IDODOApproveProxy(_DODO_APPROVE_PROXY_).claimTokens(buyToken, msg.sender, dodoMysteryBox, payAmount);
|
||||
}
|
||||
|
||||
IDODOMysteryBox(dodoMysteryBox).buyTickets(msg.sender, ticketAmount);
|
||||
|
||||
emit BuyTicket(msg.sender, dodoMysteryBox, ticketAmount);
|
||||
}
|
||||
}
|
||||
1115
deploy-detail-v2.0.txt
Normal file
1115
deploy-detail-v2.0.txt
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user