update
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -16,6 +16,7 @@ deploy-detail-v2.0.txt
|
|||||||
deploy-detail-periphery.txt
|
deploy-detail-periphery.txt
|
||||||
deploy-drops.txt
|
deploy-drops.txt
|
||||||
deploy-nft.txt
|
deploy-nft.txt
|
||||||
|
deploy-starter.txt
|
||||||
kovan-mock-v2.0.txt
|
kovan-mock-v2.0.txt
|
||||||
deploy-detail-erc20V3.txt
|
deploy-detail-erc20V3.txt
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ module.exports = {
|
|||||||
//TOKEN
|
//TOKEN
|
||||||
WETH: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
|
WETH: "0x0d500B1d8E8eF31E21C99d1Db9A6444d3ADf1270",
|
||||||
CHI: "0x0000000000000000000000000000000000000000",
|
CHI: "0x0000000000000000000000000000000000000000",
|
||||||
DODO: "0x6B208E08dcF6BD51F50C5Da09d15B2D8E5C46Cf2",
|
DODO: "0xe4bf2864ebec7b7fdf6eeca9bacae7cdfdaffe78",
|
||||||
|
|
||||||
//Helper
|
//Helper
|
||||||
DODOSellHelper: "0xDfaf9584F5d229A9DBE5978523317820A8897C5A",
|
DODOSellHelper: "0xDfaf9584F5d229A9DBE5978523317820A8897C5A",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
MOONRIVER_CONFIG: {
|
MOONRIVER_CONFIG: {
|
||||||
//TOKEN
|
//TOKEN
|
||||||
WETH: "0xf50225a84382c74CbdeA10b0c176f71fc3DE0C4d",
|
WETH: "0x98878b06940ae243284ca214f92bb71a2b032b8a",//0xf50225a84382c74CbdeA10b0c176f71fc3DE0C4d
|
||||||
CHI: "0x0000000000000000000000000000000000000000",
|
CHI: "0x0000000000000000000000000000000000000000",
|
||||||
DODO: "",
|
DODO: "",
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ module.exports = {
|
|||||||
//DODO: "0xB5397B2210f49e96a5EB2c9747Aa2bD9397d90C0",
|
//DODO: "0xB5397B2210f49e96a5EB2c9747Aa2bD9397d90C0",
|
||||||
//ERC20Helper: "0x6373ceB657C83C91088d328622573FB766064Ac4",
|
//ERC20Helper: "0x6373ceB657C83C91088d328622573FB766064Ac4",
|
||||||
DODOSellHelper: "0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01",
|
DODOSellHelper: "0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01",
|
||||||
DODOCalleeHelper: "0xc4436fBAE6eBa5d95bf7d53Ae515F8A707Bd402A", // replace weth need to redeploy
|
DODOCalleeHelper: "0x533AF8ad419fB3082df9C80BE2ad903912a817FB", // replace weth need to redeploy
|
||||||
DODOV1PmmHelper: "0x3CD6D7F5fF977bf8069548eA1F9441b061162b42",
|
DODOV1PmmHelper: "0x3CD6D7F5fF977bf8069548eA1F9441b061162b42",
|
||||||
DODOV2RouteHelper: "0x8a6998b9A4E4f63c8aDB46ceEB01857A956A8122",
|
DODOV2RouteHelper: "0x8a6998b9A4E4f63c8aDB46ceEB01857A956A8122",
|
||||||
CurveSample: "",
|
CurveSample: "",
|
||||||
|
|||||||
@@ -114,7 +114,14 @@ module.exports = {
|
|||||||
FilterERC721V1: "0x47E2C563cDCd7F36B4E77cc33a6A5c152663f915",
|
FilterERC721V1: "0x47E2C563cDCd7F36B4E77cc33a6A5c152663f915",
|
||||||
FilterERC1155V1: "0x55e2e1fe50FfaBd4fE3712Bd1aBfc9307a44c7F4",
|
FilterERC1155V1: "0x55e2e1fe50FfaBd4fE3712Bd1aBfc9307a44c7F4",
|
||||||
DODONFTPoolProxy: "0x81AD954B2Ed65d85d3023Eeb2D8DF6A512D4cd59",
|
DODONFTPoolProxy: "0x81AD954B2Ed65d85d3023Eeb2D8DF6A512D4cd59",
|
||||||
NFTPoolController: "0xf5d24499dD76C3791ee6D19aa206f55b72270415"
|
NFTPoolController: "0xf5d24499dD76C3791ee6D19aa206f55b72270415",
|
||||||
|
|
||||||
|
|
||||||
|
//=================== Starter ===================
|
||||||
|
DODOStarterProxy: "0x451E07405B79eDEEA87ccFa57e1BaF184Bea6773",
|
||||||
|
DODOStarterFactory: "0xa28D60c3eCDc52521c8219bd6a4eba0AA8900F88",
|
||||||
|
FairFunding: "0x5D1f0d091B3Fe5F79908F232c50CfC3D9084c59d",
|
||||||
|
InstantFunding: "0x9297C04D4F8B47cCf7F2733b0F8f151aE1cb4615"
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -59,6 +59,9 @@ contract Storage is InitializableOwnable, ReentrancyGuard {
|
|||||||
uint256 public _BIDDING_DURATION_;
|
uint256 public _BIDDING_DURATION_;
|
||||||
|
|
||||||
|
|
||||||
|
// ============ Events ============
|
||||||
|
event SetQuota(address quota);
|
||||||
|
|
||||||
// ============ Modifiers ============
|
// ============ Modifiers ============
|
||||||
modifier isNotForceStop() {
|
modifier isNotForceStop() {
|
||||||
require(!_FORCE_STOP_, "FORCE_STOP");
|
require(!_FORCE_STOP_, "FORCE_STOP");
|
||||||
@@ -73,4 +76,9 @@ contract Storage is InitializableOwnable, ReentrancyGuard {
|
|||||||
uint256 tokenAmount = IERC20(_TOKEN_ADDRESS_).balanceOf(address(this));
|
uint256 tokenAmount = IERC20(_TOKEN_ADDRESS_).balanceOf(address(this));
|
||||||
IERC20(_TOKEN_ADDRESS_).safeTransfer(_OWNER_, tokenAmount);
|
IERC20(_TOKEN_ADDRESS_).safeTransfer(_OWNER_, tokenAmount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function setQuota(address quota) external onlyOwner {
|
||||||
|
_QUOTA_ = quota;
|
||||||
|
emit SetQuota(quota);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
73
migrations/2_deploy_starter.js
Normal file
73
migrations/2_deploy_starter.js
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
const fs = require("fs");
|
||||||
|
const { deploySwitch } = require('../truffle-config.js')
|
||||||
|
const file = fs.createWriteStream("../deploy-starter.txt", { 'flags': 'a' });
|
||||||
|
let logger = new console.Console(file, file);
|
||||||
|
const { GetConfig } = require("../configAdapter.js")
|
||||||
|
|
||||||
|
const DODOStarterProxy = artifacts.require("DODOStarterProxy");
|
||||||
|
const DODOStarterFactory = artifacts.require("DODOStarterFactory");
|
||||||
|
const FairFunding = artifacts.require("FairFunding");
|
||||||
|
const InstantFunding = artifacts.require("InstantFunding");
|
||||||
|
|
||||||
|
module.exports = async (deployer, network, accounts) => {
|
||||||
|
let CONFIG = GetConfig(network, accounts)
|
||||||
|
if (CONFIG == null) return;
|
||||||
|
//Need Deploy first
|
||||||
|
let DODOApproveProxyAddress = CONFIG.DODOApproveProxy;
|
||||||
|
let CloneFactoryAddress = CONFIG.CloneFactory;
|
||||||
|
let WETHAddress = CONFIG.WETH;
|
||||||
|
|
||||||
|
if (DODOApproveProxyAddress == "" || CloneFactoryAddress == "" || WETHAddress == "") return;
|
||||||
|
|
||||||
|
let FairFundingTemplate = CONFIG.FairFunding;
|
||||||
|
let InstantFundingTemplate = CONFIG.InstantFunding;
|
||||||
|
let DODOStarterFactoryAddress = CONFIG.DODOStarterFactory;
|
||||||
|
let DODOStarterProxyAddress = CONFIG.DODOStarterProxy;
|
||||||
|
|
||||||
|
let multiSigAddress = CONFIG.multiSigAddress;
|
||||||
|
|
||||||
|
if (deploySwitch.STARTER) {
|
||||||
|
logger.log("====================================================");
|
||||||
|
logger.log("network type: " + network);
|
||||||
|
logger.log("Deploy time: " + new Date().toLocaleString());
|
||||||
|
logger.log("Deploy type: STARTER");
|
||||||
|
|
||||||
|
if (FairFundingTemplate == "") {
|
||||||
|
await deployer.deploy(FairFunding);
|
||||||
|
FairFundingTemplate = FairFunding.address;
|
||||||
|
logger.log("FairFundingTemplate: ", FairFundingTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (InstantFundingTemplate == "") {
|
||||||
|
await deployer.deploy(InstantFunding);
|
||||||
|
InstantFundingTemplate = InstantFunding.address;
|
||||||
|
logger.log("InstantFundingTemplate: ", InstantFundingTemplate);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DODOStarterFactoryAddress == "") {
|
||||||
|
await deployer.deploy(
|
||||||
|
DODOStarterFactory,
|
||||||
|
CloneFactoryAddress,
|
||||||
|
FairFundingTemplate,
|
||||||
|
InstantFundingTemplate
|
||||||
|
);
|
||||||
|
DODOStarterFactoryAddress = DODOStarterFactory.address;
|
||||||
|
logger.log("DODOStarterFactoryAddress: ", DODOStarterFactoryAddress);
|
||||||
|
|
||||||
|
const instance = await DODOStarterFactory.at(DODOStarterFactoryAddress);
|
||||||
|
var tx = await instance.initOwner(multiSigAddress);
|
||||||
|
logger.log("Init DODOStarterFactory Tx:", tx.tx);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (DODOStarterProxyAddress == "") {
|
||||||
|
await deployer.deploy(
|
||||||
|
DODOStarterProxy,
|
||||||
|
WETHAddress,
|
||||||
|
DODOApproveProxyAddress
|
||||||
|
);
|
||||||
|
DODOStarterProxyAddress = DODOStarterProxy.address;
|
||||||
|
logger.log("DODOStarterProxyAddress: ", DODOStarterProxyAddress);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -65,7 +65,8 @@ module.exports = {
|
|||||||
Drops_V2: false,
|
Drops_V2: false,
|
||||||
MineV3: false,
|
MineV3: false,
|
||||||
NFT_POOL: false,
|
NFT_POOL: false,
|
||||||
UserQuota: false
|
UserQuota: false,
|
||||||
|
STARTER: true
|
||||||
},
|
},
|
||||||
|
|
||||||
networks: {
|
networks: {
|
||||||
@@ -98,14 +99,13 @@ module.exports = {
|
|||||||
networkCheckTimeout: 100000,
|
networkCheckTimeout: 100000,
|
||||||
provider: function () {
|
provider: function () {
|
||||||
return new HDWalletProvider(privKey, "https://rinkeby.infura.io/v3/" + infuraId);
|
return new HDWalletProvider(privKey, "https://rinkeby.infura.io/v3/" + infuraId);
|
||||||
// return new HDWalletProvider(privKey, "https://eth-rinkeby.dodoex.io");
|
|
||||||
},
|
},
|
||||||
gas: 10000000,
|
gas: 10000000,
|
||||||
gasPrice: 1500000000,
|
gasPrice: 1500000000,
|
||||||
network_id: 4,
|
network_id: 4,
|
||||||
skipDryRun: true,
|
skipDryRun: true,
|
||||||
confirmations: 2,
|
// confirmations: 10,
|
||||||
timeoutBlocks: 200,
|
// timeoutBlocks: 200,
|
||||||
},
|
},
|
||||||
|
|
||||||
live: {
|
live: {
|
||||||
|
|||||||
Reference in New Issue
Block a user