This commit is contained in:
owen05
2020-11-12 11:38:36 +08:00
parent cbc6786ca5
commit a2ce55f336
3 changed files with 14 additions and 15 deletions

View File

@@ -9,6 +9,13 @@ const DODOSellHelper = artifacts.require("DODOSellHelper");
const DEPLOY_ROUTE = true;
module.exports = async (deployer, network) => {
let DODOSellHelperAddress = ""
if(network == 'kovan'){
DODOSellHelperAddress = "0xbdEae617F2616b45DCB69B287D52940a76035Fe3";
}else {
DODOSellHelperAddress = "";
}
logger.log("====================================================");
logger.log("network type: " + network);
logger.log("Deploy time: " + new Date().toLocaleString());
@@ -16,11 +23,14 @@ module.exports = async (deployer, network) => {
if (DEPLOY_ROUTE) {
logger.log("Deploy type: Smart Route");
await deployer.deploy(SmartApprove);
await deployer.deploy(DODOSellHelper);
if(DODOSellHelperAddress == "") {
await deployer.deploy(DODOSellHelper);
DODOSellHelperAddress = DODOSellHelper.address;
}
logger.log("SmartApprove Address: ",SmartApprove.address);
logger.log("DODOSellHelper Address: ",DODOSellHelper.address);
logger.log("DODOSellHelper Address: ",DODOSellHelperAddress);
await deployer.deploy(SmartSwap,SmartApprove.address,DODOSellHelper.address);
await deployer.deploy(SmartSwap,SmartApprove.address,DODOSellHelperAddress);
logger.log("SmartSwap Address: ",SmartSwap.address);
const SmartApproveInstance = await SmartApprove.deployed();