From cca9f9b115a5d0132de310de539804b27b7c8ff4 Mon Sep 17 00:00:00 2001 From: owen05 Date: Sat, 19 Dec 2020 12:03:26 +0800 Subject: [PATCH] kovan mock txs shell --- deploy-detail-v2.0.txt | 25 +++++ kovan-mock-v2.0.txt | 58 +++++++++++ migrations/3_deploy_v2.js | 36 +++---- migrations/4_deploy_v2_mock.js | 182 +++++++++++++++++++++++++++++++++ 4 files changed, 283 insertions(+), 18 deletions(-) create mode 100644 kovan-mock-v2.0.txt create mode 100644 migrations/4_deploy_v2_mock.js diff --git a/deploy-detail-v2.0.txt b/deploy-detail-v2.0.txt index 913b48e..d93b2fe 100644 --- a/deploy-detail-v2.0.txt +++ b/deploy-detail-v2.0.txt @@ -40,3 +40,28 @@ CpFactoryAddress: 0xCE0fD3600E9dD81A6fB7E1d5Eed0F93a90Da184D DODOProxyV2 Address: 0x7102A9AA2146557EA60a6319EB40e8C8d856e628 Init DODOProxyV2 Tx: 0xfd80f2545d8cb0d102bd8a9064bbc802e44aa16e23128256745e2f305b6da64a DODOApprovce Init tx: 0x87e950811171b325701e0e94aae346614b5361ac0a0285f15383626709063e63 +==================================================== +network type: kovan +Deploy time: 2020/12/19 上午11:54:52 +Deploy type: V2 +DvmTemplateAddress: 0xb509d7BdbC9847a7bc4B73e96F92Ecf4058E3bc0 +DvmAdminTemplateAddress: 0x45f455d7E233403F10b7AFCB0d0d0c0d775AFf63 +DppTemplateAddress: 0xDaF105aCc7F83ac66dB7085D37123e047D1999c4 +DppAdminTemplateAddress: 0xDfdd9e1693C3A6AF25307c9dA561021f9e685878 +CpTemplateAddress: 0x59652F06fEdDe7780E8fa5C88CE850F67F26F0Fc +DvmFactoryAddress: 0x03db1C1C1Adf27A73DFe9BDc3B21D4c569c2D41e +Init DvmFactory Tx: 0xce8971eb6532857db32acd7d77f281a081544051dfa30e8c06c885c91b1fcfe3 +UnownedDvmFactoryAddress: 0xc8A53F0fE35106762420E3b69866547BB4f389c2 +DppFactoryAddress: 0x1B3Ce1Ac27C1C2d05743CE237aAF3406372049b1 +Init DppFactory Tx: 0x26b70c5f33ee43141c95e70b6419fe193a25d38cbf9c69e8a16dbf76f6363078 +CpFactoryAddress: 0x9F90AD19C15d7aF4291EB17b637DF78EaC639EA3 +DODOProxyV2 Address: 0xB759D9b5451E186D3d9027fc3E5d1AD1415709Ac +Init DODOProxyV2 Tx: 0xfd68ccf19b77a2318ce30db8fec2edb99f8eab961f386b8c635e602eeab2379b +==================================================== +network type: kovan +Deploy time: 2020/12/19 下午12:01:31 +Deploy type: V2 +DODOApprove Address: 0xa7Beb077e2A44243F1215F80dBb133Aa98A2143d +DODOProxyV2 Address: 0x852AF3De06Daaf5bBcb2B2B7a19D2b4Df15e488F +Init DODOProxyV2 Tx: 0x9420d8236486c0b8d46cf3155f52acd78ff71beba6456c3e7a6a65d47e9d3f7f +DODOApprove Init tx: 0x38c5ace45ae99654f94baf328d53f293320ec70b13093e8e645d6e858d9a85f1 diff --git a/kovan-mock-v2.0.txt b/kovan-mock-v2.0.txt new file mode 100644 index 0000000..28a25ba --- /dev/null +++ b/kovan-mock-v2.0.txt @@ -0,0 +1,58 @@ +==================================================== +network type: kovan +Deploy time: 2020/12/18 下午10:51:45 +Mock Tx: V2 +ERC20TemplateAddress: 0x77d2e257241e6971688b08bdA9F658F065d7bb41 +MintableERC20TemplateAddress: 0xA45a64DAba80757432fA4d654Df12f65f020C13C +ERC20FactoryAddress: 0xCb1A2f64EfB02803276BFB5a8D511C4D950282a0 +==================================================== +network type: kovan +Deploy time: 2020/12/18 下午10:59:41 +Mock Tx: V2 +==================================================== +network type: kovan +Deploy time: 2020/12/18 下午11:02:45 +Mock Tx: V2 +ERC20 address: 0x41372596189C40712fEf3d8C101326F04806Ff40; Symbol:ABC0 +==================================================== +network type: kovan +Deploy time: 2020/12/18 下午11:05:08 +Mock Tx: V2 +ERC20 address: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE; Symbol:ABC0 +ERC20 address: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA; Symbol:ABC1 +ERC20 address: 0xFE1133ea03d701C5006b7f065bBf987955E7A67C; Symbol:ABC2 +ERC20 address: 0x123ee47BaE3F64d422F2FB18ac444B47c1880F4C; Symbol:ABC3 +ERC20 address: 0x0ab8EF8B19655F32959c83e5fC5cD6536065D28f; Symbol:ABC4 +ERC20 address: 0x6462794c19e6b4543BEC56200212c7c746bbB9eB; Symbol:ABC5 +ERC20 address: 0x8063EBEB4bE06935d81f836be61E6893B2a21318; Symbol:ABC6 +ERC20 address: 0xed59a1451c78516d7eAc65A396ADE62E73b76C9b; Symbol:ABC7 +==================================================== +network type: kovan +Deploy time: 2020/12/19 上午11:41:25 +Mock POOL Tx: V2 +==================================================== +network type: kovan +Deploy time: 2020/12/19 上午11:43:50 +Mock POOL Tx: V2 +Approve:0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE Tx: 0xbb76b6554626c2e00939a903b044a99a4460118134e1697a66b2a25faca7b81c +Approve:0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA Tx: 0x3d0ed3a4eb90f32870f338410a36d486985dc2a332c1d8979f907ce857dbf599 +Approve:0xFE1133ea03d701C5006b7f065bBf987955E7A67C Tx: 0x91ccb9986db3d1079895422cb0caad0fedd15c5907a5af29122972a833c795a8 +Approve:0x123ee47BaE3F64d422F2FB18ac444B47c1880F4C Tx: 0x3d76718d81120b09808220f43435cc9b12becd1bfabfcb655240c36b99bdfd18 +Approve:0x0ab8EF8B19655F32959c83e5fC5cD6536065D28f Tx: 0xa5af38be6caf411cf726c7005f354f86681db7429b9be7a73594a39f460ed890 +Approve:0x6462794c19e6b4543BEC56200212c7c746bbB9eB Tx: 0x9650ad28f620d23e48911b6907879ca81beee3decf6264f86ddf66dec68955bc +==================================================== +network type: kovan +Deploy time: 2020/12/19 上午11:46:06 +Mock POOL Tx: V2 +Create DVM 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE Tx: 0xd804ce3e9eb03e846ad8e86cf3315619b1e165cbd15feb490e0bfb99e899ccab +Create DVM 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA Tx: 0x004394d533b85a761a1e415d718c2f178f3c21b047e75e68ccf43230b4e63771 +Create DVM 0xFE1133ea03d701C5006b7f065bBf987955E7A67C Tx: 0x5c8c2d2e45eb6b8cd278165748c9ba3979d83d300a0a1b060936b580df1ac50a +Create DVM 0x123ee47BaE3F64d422F2FB18ac444B47c1880F4C Tx: 0xec7977c7f27dd1e9cfa3a62a8f2a5b6a6a8aa9cdff9d9cc8b1162929ed16662d +Create DVM 0x0ab8EF8B19655F32959c83e5fC5cD6536065D28f Tx: 0xcea08b8dd7109fb222203426951e49b8ee2d036df3547b56c2bfe8043f2c83c7 +Create DVM 0x6462794c19e6b4543BEC56200212c7c746bbB9eB Tx: 0x2551bb2b6cc965e012b5c137ef0e2ad6cc8841418ab9047593e1f5ef73a83044 +Create DPP 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE Tx: 0xe8e97e1c68a6987b23fdf641522df83e68f5ca63a78d87ca4f93ca41f733e365 +Create DPP 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA Tx: 0x81ec0bce5b4524ed38a0a2619d80f08d4bb112ec7c7586a166a2cd36f8a33c42 +Create DPP 0xFE1133ea03d701C5006b7f065bBf987955E7A67C Tx: 0x591e9d4f8aeb1773c1db801bbe06720e8147226b667c3a1e8099ab63f723a52b +Create DPP 0x123ee47BaE3F64d422F2FB18ac444B47c1880F4C Tx: 0xee691843418c432c77dc8f55bad638551ca4c1f71ca98a7a9e789a5c10d14569 +Create DPP 0x0ab8EF8B19655F32959c83e5fC5cD6536065D28f Tx: 0x60586a3b460a507107e2412ce68eb370d12d3ccfe8cab2d313871cc521c59eeb +Create DPP 0x6462794c19e6b4543BEC56200212c7c746bbB9eB Tx: 0x0c4a29fea84b4fff01898dc447ae311d3e76caffe14ec877dd437a593423b853 diff --git a/migrations/3_deploy_v2.js b/migrations/3_deploy_v2.js index 5947563..5e949f2 100644 --- a/migrations/3_deploy_v2.js +++ b/migrations/3_deploy_v2.js @@ -68,25 +68,25 @@ module.exports = async (deployer, network, accounts) => { //Template CloneFactoryAddress = "0xf7959fe661124C49F96CF30Da33729201aEE1b27"; FeeRateModelTemplateAddress = "0xEF3137780B387313c5889B999D03BdCf9aeEa892"; - ConstFeeRateModelTemplateAddress = ""; + ConstFeeRateModelTemplateAddress = "0x2ec9579Cf7ae77B4e538F56274501f518ABFeA2e"; PermissionManagerTemplateAddress = "0x5D2Da09501d97a7bf0A8F192D2eb2F9Aa80d3241"; ExternalValueTemplateAddress = "0xe0f813951dE2BB012f7Feb981669F9a7b5250A57"; //Default Template DefaultGasSourceAddress = "0xE0c0df0e0be7ec4f579503304a6C186cA4365407"; - DefaultMtFeeRateAddress = ""; - DefaultPermissionAddress = ""; + DefaultMtFeeRateAddress = "0xEfdE4225AC747136289979e29f1236527b2E4DB1"; + DefaultPermissionAddress = "0xACc7E23368261e1E02103c4e5ae672E7D01f5797"; - DvmTemplateAddress = ""; - DvmAdminTemplateAddress = ""; - DppTemplateAddress = ""; - DppAdminTemplateAddress = ""; - CpTemplateAddress = ""; + DvmTemplateAddress = "0xb509d7BdbC9847a7bc4B73e96F92Ecf4058E3bc0"; + DvmAdminTemplateAddress = "0x45f455d7E233403F10b7AFCB0d0d0c0d775AFf63"; + DppTemplateAddress = "0xDaF105aCc7F83ac66dB7085D37123e047D1999c4"; + DppAdminTemplateAddress = "0xDfdd9e1693C3A6AF25307c9dA561021f9e685878"; + CpTemplateAddress = "0x59652F06fEdDe7780E8fa5C88CE850F67F26F0Fc"; //Factory - DvmFactoryAddress = ""; - UnownedDvmFactoryAddress = ""; - DppFactoryAddress = ""; - CpFactoryAddress = ""; - //Proxy + DvmFactoryAddress = "0x03db1C1C1Adf27A73DFe9BDc3B21D4c569c2D41e"; + UnownedDvmFactoryAddress = "0xc8A53F0fE35106762420E3b69866547BB4f389c2"; + DppFactoryAddress = "0x1B3Ce1Ac27C1C2d05743CE237aAF3406372049b1"; + CpFactoryAddress = "0x9F90AD19C15d7aF4291EB17b637DF78EaC639EA3"; + //Approve DODOApproveAddress = ""; //Account multiSigAddress = accounts[0]; @@ -268,7 +268,7 @@ module.exports = async (deployer, network, accounts) => { CloneFactoryAddress, DvmTemplateAddress, DvmAdminTemplateAddress, - ConstFeeRateModelTemplateAddress, + FeeRateModelTemplateAddress, PermissionManagerTemplateAddress, DefaultGasSourceAddress ); @@ -284,7 +284,7 @@ module.exports = async (deployer, network, accounts) => { UnownedDvmFactory, CloneFactoryAddress, DvmTemplateAddress, - ConstFeeRateModelTemplateAddress, + FeeRateModelTemplateAddress, defaultMaintainer, DefaultMtFeeRateAddress, DefaultPermissionAddress, @@ -319,7 +319,7 @@ module.exports = async (deployer, network, accounts) => { CloneFactoryAddress, CpTemplateAddress, UnownedDvmFactoryAddress, - ConstFeeRateModelTemplateAddress, + FeeRateModelTemplateAddress, defaultMaintainer, DefaultMtFeeRateAddress, DefaultPermissionAddress, @@ -344,9 +344,9 @@ module.exports = async (deployer, network, accounts) => { var tx = await DODOProxyV2Instance.initOwner(multiSigAddress); logger.log("Init DODOProxyV2 Tx:", tx.tx); - + const DODOApproveInstance = await DODOApprove.at(DODOApproveAddress); var tx = await DODOApproveInstance.init(multiSigAddress,DODOProxyV2.address); - logger.log("DODOApprovce Init tx: ", tx.tx); + logger.log("DODOApprove Init tx: ", tx.tx); } }; diff --git a/migrations/4_deploy_v2_mock.js b/migrations/4_deploy_v2_mock.js new file mode 100644 index 0000000..a70a53e --- /dev/null +++ b/migrations/4_deploy_v2_mock.js @@ -0,0 +1,182 @@ +const fs = require("fs"); +const Web3 = require('web3'); +const file = fs.createWriteStream("../kovan-mock-v2.0.txt", { 'flags': 'a' }); +let logger = new console.Console(file, file); + +const CloneFactory = artifacts.require("CloneFactory"); +const ERC20Template = artifacts.require("InitializableERC20"); +const MintableERC20Template = artifacts.require("InitializableMintableERC20"); +const ERC20Factory = artifacts.require("ERC20Factory"); +const DODOProxyV2 = artifacts.require("DODOV2Proxy01"); + +const MOCK_TOKEN = false; +const MOCK_POOL = false; + +module.exports = async (deployer, network, accounts) => { + if (network != "kovan") return; + let CloneFactoryAddress = "0xf7959fe661124C49F96CF30Da33729201aEE1b27"; + let ERC20TemplateAddress = "0x77d2e257241e6971688b08bdA9F658F065d7bb41"; + let MintableERC20TemplateAddress = "0xA45a64DAba80757432fA4d654Df12f65f020C13C"; + let ERC20FactoryAddress = "0xCb1A2f64EfB02803276BFB5a8D511C4D950282a0"; + let DODOApproveAddress = "0xC38ad4314bb44EE84cC2D4B2B1BBa4644550f172"; + let DODOProxyV2Address = "0x7102A9AA2146557EA60a6319EB40e8C8d856e628"; + + const provider = new Web3.providers.HttpProvider("https://kovan.infura.io/v3/22d4a3b2df0e47b78d458f43fe50a199"); + + if (!provider) { + throw new Error(`Unable to find provider for network: ${network}`) + } + + const web3 = new Web3(provider) + + logger.log("===================================================="); + logger.log("network type: " + network); + logger.log("Deploy time: " + new Date().toLocaleString()); + + if (MOCK_POOL) { + logger.log("Mock POOL Tx: V2"); + var tx; + const quoteAddr = "0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e"; + const token0Addr = "0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE"; + const token1Addr = "0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA"; + const token2Addr = "0xFE1133ea03d701C5006b7f065bBf987955E7A67C"; + const token3Addr = "0x123ee47BaE3F64d422F2FB18ac444B47c1880F4C"; + const token4Addr = "0x0ab8EF8B19655F32959c83e5fC5cD6536065D28f"; + const token5Addr = "0x6462794c19e6b4543BEC56200212c7c746bbB9eB"; + const token0 = await ERC20Template.at(token0Addr); + const token1 = await ERC20Template.at(token1Addr); + const token2 = await ERC20Template.at(token2Addr); + const token3 = await ERC20Template.at(token3Addr); + const token4 = await ERC20Template.at(token4Addr); + const token5 = await ERC20Template.at(token5Addr); + + //approve + tx = await token0.approve(DODOApproveAddress, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + logger.log("Approve:" + token0Addr + " Tx:", tx.tx); + tx = await token1.approve(DODOApproveAddress, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + logger.log("Approve:" + token1Addr + " Tx:", tx.tx); + tx = await token2.approve(DODOApproveAddress, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + logger.log("Approve:" + token2Addr + " Tx:", tx.tx); + tx = await token3.approve(DODOApproveAddress, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + logger.log("Approve:" + token3Addr + " Tx:", tx.tx); + tx = await token4.approve(DODOApproveAddress, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + logger.log("Approve:" + token4Addr + " Tx:", tx.tx); + tx = await token5.approve(DODOApproveAddress, "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"); + logger.log("Approve:" + token5Addr + " Tx:", tx.tx); + + + const DODOProxyV2Instance = await DODOProxyV2.at(DODOProxyV2Address); + const assetTo = accounts[0]; + const baseInAmount = web3.utils.toWei("10000", 'ether'); + const quoteInAmount = 0; + const lpFeeRate = web3.utils.toWei("0.003", 'ether'); + const mtFeeRate = web3.utils.toWei("0.001", 'ether'); + const i = web3.utils.toWei("10", 'ether'); + const k = web3.utils.toWei("0.5", 'ether'); + const deadline = Math.floor(new Date().getTime() / 1000 + 60 * 10); + //DVM Pool + tx = await DODOProxyV2Instance.createDODOVendingMachine(assetTo, token0Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DVM " + token0Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOVendingMachine(assetTo, token1Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DVM " + token1Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOVendingMachine(assetTo, token2Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DVM " + token2Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOVendingMachine(assetTo, token3Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DVM " + token3Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOVendingMachine(assetTo, token4Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DVM " + token4Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOVendingMachine(assetTo, token5Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DVM " + token5Addr + " Tx:", tx.tx); + //DPP Pool + tx = await DODOProxyV2Instance.createDODOPrivatePool(token0Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DPP " + token0Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOPrivatePool(token1Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DPP " + token1Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOPrivatePool(token2Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DPP " + token2Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOPrivatePool(token3Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DPP " + token3Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOPrivatePool(token4Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DPP " + token4Addr + " Tx:", tx.tx); + tx = await DODOProxyV2Instance.createDODOPrivatePool(token5Addr, quoteAddr, baseInAmount, quoteInAmount, lpFeeRate, mtFeeRate, i, k, deadline); + logger.log("Create DPP " + token5Addr + " Tx:", tx.tx); + } + + + if (MOCK_TOKEN) { + logger.log("Mock TOKEN Tx: V2"); + if (CloneFactoryAddress == "") { + await deployer.deploy(CloneFactory); + CloneFactoryAddress = CloneFactory.address; + logger.log("CloneFactoryAddress: ", CloneFactoryAddress); + } + if (ERC20TemplateAddress == "") { + await deployer.deploy(ERC20Template); + ERC20TemplateAddress = ERC20Template.address; + logger.log("ERC20TemplateAddress: ", ERC20TemplateAddress); + } + if (MintableERC20TemplateAddress == "") { + await deployer.deploy(MintableERC20Template); + MintableERC20TemplateAddress = MintableERC20Template.address; + logger.log("MintableERC20TemplateAddress: ", MintableERC20TemplateAddress); + } + + if (ERC20FactoryAddress == "") { + await deployer.deploy( + ERC20Factory, + CloneFactoryAddress, + ERC20TemplateAddress, + MintableERC20TemplateAddress + ); + ERC20FactoryAddress = ERC20Factory.address; + logger.log("ERC20FactoryAddress: ", ERC20FactoryAddress); + } + + const ERC20FactoryInstance = await ERC20Factory.at(ERC20FactoryAddress); + + const totalSupply = web3.utils.toWei("100000000", 'ether'); + for (let i = 0; i < 8; i++) { + var tx = await ERC20FactoryInstance.createStdERC20(totalSupply, 'ABC Token', 'ABC' + i, 18); + logger.log("ERC20 address: ", tx.logs[0].args['erc20'] + "; Symbol:" + 'ABC' + i); + } + } + + + if (MOCK_TOKEN) { + logger.log("Mock TOKEN Tx: V2"); + if (CloneFactoryAddress == "") { + await deployer.deploy(CloneFactory); + CloneFactoryAddress = CloneFactory.address; + logger.log("CloneFactoryAddress: ", CloneFactoryAddress); + } + if (ERC20TemplateAddress == "") { + await deployer.deploy(ERC20Template); + ERC20TemplateAddress = ERC20Template.address; + logger.log("ERC20TemplateAddress: ", ERC20TemplateAddress); + } + if (MintableERC20TemplateAddress == "") { + await deployer.deploy(MintableERC20Template); + MintableERC20TemplateAddress = MintableERC20Template.address; + logger.log("MintableERC20TemplateAddress: ", MintableERC20TemplateAddress); + } + + if (ERC20FactoryAddress == "") { + await deployer.deploy( + ERC20Factory, + CloneFactoryAddress, + ERC20TemplateAddress, + MintableERC20TemplateAddress + ); + ERC20FactoryAddress = ERC20Factory.address; + logger.log("ERC20FactoryAddress: ", ERC20FactoryAddress); + } + + const ERC20FactoryInstance = await ERC20Factory.at(ERC20FactoryAddress); + + const totalSupply = web3.utils.toWei("100000000", 'ether'); + for (let i = 0; i < 8; i++) { + var tx = await ERC20FactoryInstance.createStdERC20(totalSupply, 'ABC Token', 'ABC' + i, 18); + logger.log("ERC20 address: ", tx.logs[0].args['erc20'] + "; Symbol:" + 'ABC' + i); + } + } +};