migrations script
This commit is contained in:
8
deploy-detail.txt
Normal file
8
deploy-detail.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
====================================================
|
||||
network type: kovan
|
||||
Deploy time: 2020/11/12 上午9:38:54
|
||||
Deploy type: Smart Route
|
||||
SmartApprove Address: 0x8D2625d0f1ed3C7E1E506Bf86b4660c1781Fd7C0
|
||||
DODOSellHelper Address: 0xbdEae617F2616b45DCB69B287D52940a76035Fe3
|
||||
SmartSwap Address: 0xC1632dD29D5c4ac1Cd7b9B7d1e23E91bB092acAC
|
||||
SmartApprovce setSmartSwap tx: 0x2e641cd363b3c42579308502dbca07e45377032fb52ae5f1acbd0d865d0ce7e3
|
||||
@@ -1 +1,33 @@
|
||||
module.exports = async (deployer, network) => {};
|
||||
const fs = require('fs');
|
||||
const file = fs.createWriteStream('../deploy-detail.txt');
|
||||
let logger = new console.Console(file, file);
|
||||
|
||||
const SmartApprove = artifacts.require("SmartApprove");
|
||||
const SmartSwap = artifacts.require("SmartSwap");
|
||||
const DODOSellHelper = artifacts.require("DODOSellHelper");
|
||||
|
||||
const DEPLOY_ROUTE = true;
|
||||
|
||||
module.exports = async (deployer, network) => {
|
||||
logger.log("====================================================");
|
||||
logger.log("network type: " + network);
|
||||
logger.log("Deploy time: " + new Date().toLocaleString());
|
||||
|
||||
if (DEPLOY_ROUTE) {
|
||||
logger.log("Deploy type: Smart Route");
|
||||
await deployer.deploy(SmartApprove);
|
||||
await deployer.deploy(DODOSellHelper);
|
||||
logger.log("SmartApprove Address: ",SmartApprove.address);
|
||||
logger.log("DODOSellHelper Address: ",DODOSellHelper.address);
|
||||
|
||||
await deployer.deploy(SmartSwap,SmartApprove.address,DODOSellHelper.address);
|
||||
logger.log("SmartSwap Address: ",SmartSwap.address);
|
||||
|
||||
const SmartApproveInstance = await SmartApprove.deployed();
|
||||
var tx = await SmartApproveInstance.setSmartSwap(SmartSwap.address);
|
||||
logger.log("SmartApprovce setSmartSwap tx: ",tx.tx);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user