ing
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@@ -21,4 +21,6 @@ node_modules
|
|||||||
|
|
||||||
#Hardhat files
|
#Hardhat files
|
||||||
cache
|
cache
|
||||||
artifacts
|
artifacts
|
||||||
|
|
||||||
|
error-v1.5-stat.txt
|
||||||
@@ -208,3 +208,29 @@ Create DPP: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x69c8a7fc6e05d7aa36114b3
|
|||||||
Create DPP: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x156595bAF85D5C29E91d959889B022d952190A64 Tx: 0x3b53391eb40bf8839f41a58adf18fe02682fdc7be9f540d1737f889b8c9720d5
|
Create DPP: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x156595bAF85D5C29E91d959889B022d952190A64 Tx: 0x3b53391eb40bf8839f41a58adf18fe02682fdc7be9f540d1737f889b8c9720d5
|
||||||
Create DPP: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e Tx: 0xa82e90e7d03aa75cfc3d2ecf6a8eaf2c9e2a77a5d43b1c0dc7575f46d7f5cf7b
|
Create DPP: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e Tx: 0xa82e90e7d03aa75cfc3d2ecf6a8eaf2c9e2a77a5d43b1c0dc7575f46d7f5cf7b
|
||||||
Create DPP: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x156595bAF85D5C29E91d959889B022d952190A64 Tx: 0xd4746f0f885d150764d89299bbbdea2c06bc08ab121bdf151d999daf5efacdb8
|
Create DPP: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x156595bAF85D5C29E91d959889B022d952190A64 Tx: 0xd4746f0f885d150764d89299bbbdea2c06bc08ab121bdf151d999daf5efacdb8
|
||||||
|
====================================================
|
||||||
|
network type: kovan
|
||||||
|
Deploy time: 2020/12/24 下午12:36:32
|
||||||
|
Mock POOL Tx: V2
|
||||||
|
Create DVM: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e Pool:0x7A71E03829cf70cF15Be7534561D8626b90c9450
|
||||||
|
Create DVM: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x156595bAF85D5C29E91d959889B022d952190A64 Pool:0xCeDfeda3D7D90eaF6F7Aa04936ebD77109ba5740
|
||||||
|
Create DVM: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e Pool:0x9d1B75e35AabE062ec54C2E3F26685C57e897c4b
|
||||||
|
Create DVM: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x156595bAF85D5C29E91d959889B022d952190A64 Pool:0x61706D93E7901BaA2f8e541404c2583eC7A1C293
|
||||||
|
Create DPP: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e Pool:0x1d4f55C99BEF84ED889699Be64A691c6651F847E
|
||||||
|
Create DPP: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x156595bAF85D5C29E91d959889B022d952190A64 Pool:0x0fbd69eC65E3Cc16eEA8A8913656F1EBc3fa1Dc0
|
||||||
|
Create DPP: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e Pool:0x918497560A41621F03EA6b3B7865f42e5e11BF20
|
||||||
|
Create DPP: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x156595bAF85D5C29E91d959889B022d952190A64 Pool:0x24D98FBE194FD34e168B905ecCb08F49310c7F54
|
||||||
|
====================================================
|
||||||
|
network type: kovan
|
||||||
|
Deploy time: 2020/12/24 下午4:17:33
|
||||||
|
Mock SWAP Tx: V2
|
||||||
|
====================================================
|
||||||
|
network type: kovan
|
||||||
|
Deploy time: 2020/12/24 下午4:18:21
|
||||||
|
Mock SWAP Tx: V2
|
||||||
|
Swap Tx:0x259831396ec3ff854d560eff71340c2d7670c986761f7829262ca4b15ebad396
|
||||||
|
====================================================
|
||||||
|
network type: kovan
|
||||||
|
Deploy time: 2020/12/24 下午4:35:40
|
||||||
|
Mock SWAP Tx: V2
|
||||||
|
Swap Tx:0x3adcb6a34a7c86d62f9aca1b9448b0c66092bd8bab535361972bf564090a8124
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ const ERC20Template = artifacts.require("InitializableERC20");
|
|||||||
const MintableERC20Template = artifacts.require("InitializableMintableERC20");
|
const MintableERC20Template = artifacts.require("InitializableMintableERC20");
|
||||||
const ERC20Factory = artifacts.require("ERC20Factory");
|
const ERC20Factory = artifacts.require("ERC20Factory");
|
||||||
const DODOProxyV2 = artifacts.require("DODOV2Proxy01");
|
const DODOProxyV2 = artifacts.require("DODOV2Proxy01");
|
||||||
|
const DVMFactory = artifacts.require("DVMFactory");
|
||||||
|
const DPPFactory = artifacts.require("DPPFactory");
|
||||||
|
|
||||||
const POOL_PARAM = [
|
const POOL_PARAM = [
|
||||||
{
|
{
|
||||||
@@ -51,6 +53,9 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
let ERC20TemplateAddress = "0x77d2e257241e6971688b08bdA9F658F065d7bb41";
|
let ERC20TemplateAddress = "0x77d2e257241e6971688b08bdA9F658F065d7bb41";
|
||||||
let MintableERC20TemplateAddress = "0xA45a64DAba80757432fA4d654Df12f65f020C13C";
|
let MintableERC20TemplateAddress = "0xA45a64DAba80757432fA4d654Df12f65f020C13C";
|
||||||
let ERC20FactoryAddress = "0xCb1A2f64EfB02803276BFB5a8D511C4D950282a0";
|
let ERC20FactoryAddress = "0xCb1A2f64EfB02803276BFB5a8D511C4D950282a0";
|
||||||
|
|
||||||
|
let DPPFactoryAddress = "0x58Bc8D248AcbE95CE29CF893C6666D58AF92d941";
|
||||||
|
let DVMFactoryAddress = "0xF2a62693FB14b326C3719e5aeEF28e8e66dC954e";
|
||||||
let DODOApproveAddress = "0x9F332B3a07536A2b0caaB3E3b9D2a5dFD6173c6c";
|
let DODOApproveAddress = "0x9F332B3a07536A2b0caaB3E3b9D2a5dFD6173c6c";
|
||||||
let DODOProxyV2Address = "0xd5C27770E8e2F43B959484971472a0019b17fA56";
|
let DODOProxyV2Address = "0xd5C27770E8e2F43B959484971472a0019b17fA56";
|
||||||
|
|
||||||
@@ -66,6 +71,23 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
logger.log("network type: " + network);
|
logger.log("network type: " + network);
|
||||||
logger.log("Deploy time: " + new Date().toLocaleString());
|
logger.log("Deploy time: " + new Date().toLocaleString());
|
||||||
|
|
||||||
|
|
||||||
|
if (deploySwitch.MOCK_V2_SWAP) {
|
||||||
|
logger.log("Mock SWAP Tx: V2");
|
||||||
|
const DODOProxyV2Instance = await DODOProxyV2.at(DODOProxyV2Address);
|
||||||
|
var tx = await DODOProxyV2Instance.dodoSwapV2TokenToToken(
|
||||||
|
accounts[0],
|
||||||
|
"0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e",
|
||||||
|
"0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE",
|
||||||
|
web3.utils.toWei("10", 'mwei'),
|
||||||
|
0,
|
||||||
|
['0x1d4f55C99BEF84ED889699Be64A691c6651F847E'],
|
||||||
|
[1],
|
||||||
|
Math.floor(new Date().getTime() / 1000 + 60 * 10)
|
||||||
|
);
|
||||||
|
logger.log("Swap Tx:" + tx.tx);
|
||||||
|
}
|
||||||
|
|
||||||
if (deploySwitch.MOCK_V2_POOL) {
|
if (deploySwitch.MOCK_V2_POOL) {
|
||||||
logger.log("Mock POOL Tx: V2");
|
logger.log("Mock POOL Tx: V2");
|
||||||
var tx;
|
var tx;
|
||||||
@@ -105,6 +127,9 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
logger.log("Approve:" + quote1Addr + " Tx:", tx.tx);
|
logger.log("Approve:" + quote1Addr + " Tx:", tx.tx);
|
||||||
}
|
}
|
||||||
const DODOProxyV2Instance = await DODOProxyV2.at(DODOProxyV2Address);
|
const DODOProxyV2Instance = await DODOProxyV2.at(DODOProxyV2Address);
|
||||||
|
const DVMFactoryInstance = await DVMFactory.at(DVMFactoryAddress);
|
||||||
|
const DPPFactoryInstance = await DPPFactory.at(DPPFactoryAddress);
|
||||||
|
|
||||||
const assetTo = accounts[0];
|
const assetTo = accounts[0];
|
||||||
const baseInAmount = web3.utils.toWei("1000", 'ether');
|
const baseInAmount = web3.utils.toWei("1000", 'ether');
|
||||||
const quoteInAmount = web3.utils.toWei("100", 'mwei');
|
const quoteInAmount = web3.utils.toWei("100", 'mwei');
|
||||||
@@ -123,7 +148,8 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
POOL_PARAM[i].k,
|
POOL_PARAM[i].k,
|
||||||
deadline
|
deadline
|
||||||
);
|
);
|
||||||
logger.log("Create DVM: " + POOL_PARAM[i].baseAddr + "-" + POOL_PARAM[i].quoteAddr + " Tx:", tx.tx);
|
var poolAddress = await DVMFactoryInstance._REGISTRY_(POOL_PARAM[i].baseAddr, POOL_PARAM[i].quoteAddr, 0);
|
||||||
|
logger.log("Create DVM: " + POOL_PARAM[i].baseAddr + "-" + POOL_PARAM[i].quoteAddr + " Pool:" + poolAddress + " Tx:", tx.tx);
|
||||||
}
|
}
|
||||||
//DVM Pool
|
//DVM Pool
|
||||||
for (var i = 0; i < POOL_PARAM.length; i++) {
|
for (var i = 0; i < POOL_PARAM.length; i++) {
|
||||||
@@ -138,7 +164,8 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
POOL_PARAM[i].k,
|
POOL_PARAM[i].k,
|
||||||
deadline
|
deadline
|
||||||
);
|
);
|
||||||
logger.log("Create DPP: " + POOL_PARAM[i].baseAddr + "-" + POOL_PARAM[i].quoteAddr + " Tx:", tx.tx);
|
var poolAddress = await DPPFactoryInstance._REGISTRY_(POOL_PARAM[i].baseAddr, POOL_PARAM[i].quoteAddr, 0);
|
||||||
|
logger.log("Create DPP: " + POOL_PARAM[i].baseAddr + "-" + POOL_PARAM[i].quoteAddr + " Pool:" + poolAddress + " Tx:", tx.tx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,8 @@ module.exports = {
|
|||||||
DEPLOY_V1: false,
|
DEPLOY_V1: false,
|
||||||
DEPLOY_V2: false,
|
DEPLOY_V2: false,
|
||||||
MOCK_TOKEN: false,
|
MOCK_TOKEN: false,
|
||||||
MOCK_V2_POOL: true,
|
MOCK_V2_POOL: false,
|
||||||
|
MOCK_V2_SWAP: true,
|
||||||
HELPER_V2: false,
|
HELPER_V2: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user