fix nft deploy shell
This commit is contained in:
@@ -64,8 +64,6 @@ module.exports = {
|
||||
|
||||
|
||||
//================== NFT ====================
|
||||
ConstFeeRateModel: "",
|
||||
FeeDistributor: "",
|
||||
Fragment: "",
|
||||
NFTCollateralVault: "",
|
||||
DODONFTRouteHelper: "",
|
||||
@@ -77,7 +75,6 @@ module.exports = {
|
||||
DODONFTRegistry: "",
|
||||
DODONFTProxy: "",
|
||||
|
||||
|
||||
//================= MysteryBox =================
|
||||
MysteryBoxV1: "0xc25286ef3BaE3f6Fe2d6d0A6e2acAd0301AF97b8",
|
||||
RandomGenerator: "0x7C062B9C584fA6eC2504270790D38240A2c5fE72",
|
||||
|
||||
@@ -62,19 +62,16 @@ module.exports = {
|
||||
|
||||
|
||||
//================== NFT ====================
|
||||
ConstFeeRateModel: "0xBDAcEcF886a4F0C509260d9678D5673C3E8fa4b7",
|
||||
FeeDistributor: "0xC7da6C32E301C042C2237ca04aa4BB6D2e5C86B1",
|
||||
Fragment: "0xc83c4aFdF216C7D0E15D50B9e1658298320A9551",
|
||||
NFTCollateralVault: "0x7e83d9d94837eE82F0cc18a691da6f42F03F1d86",
|
||||
DODONFTRouteHelper: "0xAE683548702be6d651e179e5F9313272bb18596A",
|
||||
Fragment: "",
|
||||
NFTCollateralVault: "",
|
||||
DODONFTRouteHelper: "",
|
||||
|
||||
InitializableERC721: "0x62dC4615AC755959a82b6D22FA5652A037284c0b",
|
||||
InitializableERC1155: "0xfa391c0Ed6898e0C6186605d69e877f1317Bb506",
|
||||
NFTTokenFactory: "0xdeBB45aCffF3b5e610C1EdF45DFaaea0030EAdaF",
|
||||
|
||||
DODONFTRegistry: "0xF405372b7808363DCfbb5Eb81204889B7a69Aa3e",
|
||||
DODONFTProxy: "0x8812E32b31530d21D1fE70A45bBa66bbEB3641C5",
|
||||
|
||||
DODONFTRegistry: "",
|
||||
DODONFTProxy: "",
|
||||
|
||||
//================= MysteryBox =================
|
||||
MysteryBoxV1: "0xbfb19a7e788b2fbC47Bc9013694C6854Ce0e1fAd",
|
||||
|
||||
@@ -1,77 +0,0 @@
|
||||
/*
|
||||
|
||||
Copyright 2020 DODO ZOO.
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
*/
|
||||
|
||||
pragma solidity 0.6.9;
|
||||
|
||||
import {IDODOApproveProxy} from "../DODOApproveProxy.sol";
|
||||
import {IDODOV2} from "./../intf/IDODOV2.sol";
|
||||
import {IERC20} from "../../intf/IERC20.sol";
|
||||
import {SafeERC20} from "../../lib/SafeERC20.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";
|
||||
|
||||
/**
|
||||
* @title DODOUpCpProxy
|
||||
* @author DODO Breeder
|
||||
*
|
||||
* @notice UpCrowdPooling Proxy (temporary)
|
||||
*/
|
||||
contract DODOUpCpProxy is ReentrancyGuard {
|
||||
using SafeMath for uint256;
|
||||
using SafeERC20 for IERC20;
|
||||
|
||||
// ============ Storage ============
|
||||
|
||||
address constant _ETH_ADDRESS_ = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
||||
address public immutable _WETH_;
|
||||
address public immutable _UPCP_FACTORY_;
|
||||
|
||||
fallback() external payable {}
|
||||
|
||||
receive() external payable {}
|
||||
|
||||
constructor(
|
||||
address upCpFactory,
|
||||
address payable weth
|
||||
) public {
|
||||
_UPCP_FACTORY_ = upCpFactory;
|
||||
_WETH_ = weth;
|
||||
}
|
||||
|
||||
//============ UpCrowdPooling Functions (create) ============
|
||||
|
||||
function createUpCrowdPooling(
|
||||
address creator,
|
||||
address baseToken,
|
||||
address quoteToken,
|
||||
uint256 baseInAmount,
|
||||
uint256[] memory timeLine,
|
||||
uint256[] memory valueList,
|
||||
bool isOpenTWAP
|
||||
) external payable preventReentrant returns (address payable newUpCrowdPooling) {
|
||||
address _baseToken = baseToken;
|
||||
address _quoteToken = quoteToken == _ETH_ADDRESS_ ? _WETH_ : quoteToken;
|
||||
|
||||
newUpCrowdPooling = IDODOV2(_UPCP_FACTORY_).createCrowdPooling();
|
||||
|
||||
IERC20(_baseToken).transferFrom(msg.sender, newUpCrowdPooling, baseInAmount);
|
||||
|
||||
newUpCrowdPooling.transfer(msg.value);
|
||||
|
||||
IDODOV2(_UPCP_FACTORY_).initCrowdPooling(
|
||||
newUpCrowdPooling,
|
||||
creator,
|
||||
_baseToken,
|
||||
_quoteToken,
|
||||
timeLine,
|
||||
valueList,
|
||||
isOpenTWAP
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -234,3 +234,18 @@ Deploy time: 2021/4/25 上午9:11:04
|
||||
Deploy type: MysteryBoxV1
|
||||
MysteryBoxV1Address: 0xbfb19a7e788b2fbC47Bc9013694C6854Ce0e1fAd
|
||||
Init MysteryBoxV1 Tx: 0x02e6e632395e31343e4c4523e009fff8157e8dd6562a3578008e8cee5e7e6aa5
|
||||
====================================================
|
||||
network type: kovan
|
||||
Deploy time: 2021/4/30 下午12:24:56
|
||||
Deploy type: NFT
|
||||
multiSigAddress: 0x7e83d9d94837eE82F0cc18a691da6f42F03F1d86
|
||||
DODONFTRegistryAddress: 0xB97f300D49F00E2f20E00EB0ca5f5373195dc892
|
||||
Init DODONFTRegistryAddress Tx: 0x5593877464213c6b05e09b5502125934d5330ce935416e76c789d1c145b94d66
|
||||
DODONFTRouteHelperAddress: 0x4c651E4c476D1B6671B62568C657F178F5A9b8C9
|
||||
NFTCollateralVaultAddress: 0x3Cf6EC1daCFffE53a49Da22EF3ca3c053241Ac5d
|
||||
FragmentAddress: 0x04cA0f0b3BEC71D2A5ebB7FeD23b562465bEb788
|
||||
DODONFTProxyAddress: 0x3A54e02612C231CC0cE1e0b1a4c49d3aDF9dA39F
|
||||
Init DODONFTProxyAddress Tx: 0xc8052841c2f8641e039f13ba13cafd5cf238fb14b455ab61b52e5ccfec5d7d40
|
||||
DODOApproveProxy unlockAddProxy tx: 0x7968ba876ec167759cfaa66e26c8b3d6c920bade8c6a29a160b62f6642a68a17
|
||||
DODOApproveProxy addDODOProxy tx: 0xc1d54e062795d2a1fead453813cfb9f96723a9330905827c710ea8c7e63a34e3
|
||||
Add AdminList on DODONFTRegistry Tx: 0xcb1f687db83b48f1928610c2c04f4685666502a3d17986bb541cbd41b15fa2a9
|
||||
|
||||
@@ -5,10 +5,8 @@ let logger = new console.Console(file, file);
|
||||
const { GetConfig } = require("../configAdapter.js")
|
||||
|
||||
const DODOApproveProxy = artifacts.require("DODOApproveProxy");
|
||||
const ConstFeeRateModel = artifacts.require("ConstFeeRateModel");
|
||||
const NFTCollateralVault = artifacts.require("NFTCollateralVault");
|
||||
const Fragment = artifacts.require("Fragment");
|
||||
const FeeDistributor = artifacts.require("FeeDistributor");
|
||||
const DODONFTRegistry = artifacts.require("DODONFTRegistry");
|
||||
const DODONFTProxy = artifacts.require("DODONFTProxy");
|
||||
const DODONFTRouteHelper = artifacts.require("DODONFTRouteHelper");
|
||||
@@ -31,8 +29,7 @@ module.exports = async (deployer, network, accounts) => {
|
||||
|
||||
if (DODOApproveProxyAddress == "" || CloneFactoryAddress == "") return;
|
||||
|
||||
let ConstFeeRateModelAddress = CONFIG.ConstFeeRateModel;
|
||||
let FeeDistributorAddress = CONFIG.FeeDistributor;
|
||||
let MtFeeRateModelAddress = CONFIG.FeeRateModel;
|
||||
let FragmentAddress = CONFIG.Fragment;
|
||||
let NFTCollateralVaultAddress = CONFIG.NFTCollateralVault;
|
||||
let DODONFTRouteHelperAddress = CONFIG.DODONFTRouteHelper;
|
||||
@@ -152,21 +149,6 @@ module.exports = async (deployer, network, accounts) => {
|
||||
logger.log("FragmentAddress: ", FragmentAddress);
|
||||
}
|
||||
|
||||
//FeeDistributor
|
||||
if (FeeDistributorAddress == "") {
|
||||
await deployer.deploy(FeeDistributor);
|
||||
FeeDistributorAddress = FeeDistributor.address;
|
||||
logger.log("FeeDistributorAddress: ", FeeDistributorAddress);
|
||||
}
|
||||
|
||||
//ConstMtFeeModel
|
||||
if (ConstFeeRateModelAddress == "") {
|
||||
await deployer.deploy(ConstFeeRateModel);
|
||||
ConstFeeRateModelAddress = ConstFeeRateModel.address;
|
||||
logger.log("ConstFeeRateModelAddress: ", ConstFeeRateModelAddress);
|
||||
}
|
||||
|
||||
|
||||
if (DODONFTProxyAddress == "") {
|
||||
await deployer.deploy(
|
||||
DODONFTProxy,
|
||||
@@ -174,11 +156,10 @@ module.exports = async (deployer, network, accounts) => {
|
||||
WETHAddress,
|
||||
DODOApproveProxyAddress,
|
||||
defaultMaintainer,
|
||||
MtFeeRateModelAddress,
|
||||
NFTCollateralVaultAddress,
|
||||
FragmentAddress,
|
||||
FeeDistributorAddress,
|
||||
DVMTemplateAddress,
|
||||
ConstFeeRateModelAddress,
|
||||
DODONFTRegistryAddress
|
||||
);
|
||||
DODONFTProxyAddress = DODONFTProxy.address;
|
||||
@@ -188,7 +169,7 @@ module.exports = async (deployer, network, accounts) => {
|
||||
logger.log("Init DODONFTProxyAddress Tx:", tx.tx);
|
||||
}
|
||||
|
||||
if (network == 'kovan' || network == 'mbtestnet') {
|
||||
if (network == 'kovan') {
|
||||
|
||||
const DODOApproveProxyInstance = await DODOApproveProxy.at(DODOApproveProxyAddress);
|
||||
var tx = await DODOApproveProxyInstance.unlockAddProxy(DODONFTProxyAddress);
|
||||
|
||||
Reference in New Issue
Block a user