update v2 deploy shell
This commit is contained in:
@@ -169,3 +169,23 @@ DODOApprove Address: 0xeEA9F08eBfde6915AB1C0051F3eB2612DbA95d5D
|
||||
DODOProxyV2 Address: 0x97B779AD504bbd5b1BFB50e57584a876Dc65171a
|
||||
Init DODOProxyV2 Tx: 0xd04c400fb46a0dd1e30ac04e9bce3e353869ffcb8ab7de622e2a936a3344d7b0
|
||||
DODOApprove Init tx: 0xa78fe0b42e29489c1395e4574531902e1bc7348268bb102b001e4f3ffd47e83a
|
||||
====================================================
|
||||
network type: kovan
|
||||
Deploy time: 2021/1/8 下午8:28:05
|
||||
Deploy type: V2
|
||||
DvmTemplateAddress: 0xB13662Fcb9140dD573e74D76BACF2085A853C779
|
||||
DppTemplateAddress: 0x5121e563d6f091945244d02cfE68b1b617206d76
|
||||
DppAdminTemplateAddress: 0x59Fd9F2065b9aA717a51111c31B3cA89291BB866
|
||||
CpTemplateAddress: 0x7b10eE056D1FBeABd0174477418f90032807b06E
|
||||
DODOApprove Address: 0xe51d8085aB43AC8BC98e965b2F7B79b998c23814
|
||||
DODOIncentiveAddress: 0xe7F4bd2a486DE815824335353973B2f4B94BaCeA
|
||||
DODOIncentive Init tx: 0x7d1761b113f4e0760e42a6ef6c469cfc15e4635c389eef3add47801a0a9a52e6
|
||||
DvmFactoryAddress: 0x0ac46584e4566d5841E7D708Ab4D92Ef191fFe37
|
||||
Init DvmFactory Tx: 0x80fe93e8b765be77b07402c4d6569557080e30d8ca1dfaea030896f4365cbec7
|
||||
DppFactoryAddress: 0x6D4a70354cd03ae3A8461eDE9A4dAd445a169a6B
|
||||
Init DppFactory Tx: 0x4befcdbc92ed3a6cab82e7c495085a346f0835eb27e943e2e1eb3ad600e79ee0
|
||||
CpFactoryAddress: 0x3a4Cdaf1796b985826CF1Ee451CACA991c2f79E1
|
||||
DODOProxyV2 Address: 0xB035847e685925647AaA8b9d74e3bFF36f81EBcB
|
||||
Init DODOProxyV2 Tx: 0xe98f8e73c4ae138e8d9594dff37afd6657bb34ac8b644e1c6fa9c2f8df8413da
|
||||
DODOApprove Init tx: 0x7b1718f215975439ff86791a0eb05cbea2081e5e1b9d9c6751280a24a1dbb17c
|
||||
DODOIncentive ChangeProxy tx: 0x670e992a681a8808b112a8c5531df7ab11beac55f603d495a07ff91dce42cad4
|
||||
|
||||
@@ -266,4 +266,28 @@ Deploy time: 2021/1/8 上午9:37:13
|
||||
Mock POOL Tx: V2
|
||||
Approve:0xA22E0FdA630101d752C748DC213B36bE74A54cf7 Tx: 0xb1ad2f3b3782f3a09f75d951073ba7a1a07cde1696427f6383d8dcfcf471d0d6
|
||||
Approve:0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b Tx: 0x11b190fa1dd1232a7ae8e17540c5af4c1b81ad0f20b5e19b28d410b84c8f02bb
|
||||
Create DPP: 0xA22E0FdA630101d752C748DC213B36bE74A54cf7-0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b Pool:0xCc50cC29769A296CB828496830664F747711F450 Tx: 0xf04ddff31fce21efe7f37a419ff15fb37e823abfe0cd2e44b47a52e0306879c1
|
||||
Create DPP: 0xA22E0FdA630101d752C748DC213B36bE74A54cf7-0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b Pool:0xCc50cC29769A296CB828496830664F747711F450 Tx: 0xf04ddff31fce21efe7f37a419ff15fb37e823abfe0cd2e44b47a52e0306879c1====================================================
|
||||
network type: kovan
|
||||
Deploy time: 2021/1/8 下午7:59:15
|
||||
Mock TOKEN Tx: V2
|
||||
ERC20 address: 0xfF2985D13953Cb92ecc585aA2B6A4AF8cB46068f; Symbol:DODO
|
||||
====================================================
|
||||
network type: kovan
|
||||
Deploy time: 2021/1/8 下午8:38:40
|
||||
Mock POOL Tx: V2
|
||||
Approve:0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE Tx: 0xc3bef608ee3a68ae77fe7f1529d32d9780550b8c65a5d29ed00561e0248d2e48
|
||||
Approve:0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA Tx: 0x3fe5c3278d36a4fee5763e34d6c1ad19096252653535ed9b10128f7c63f29051
|
||||
Approve:0xFE1133ea03d701C5006b7f065bBf987955E7A67C Tx: 0x34c1fb0abe800f0b3b1619b878c3dd74556d8c3d6aca2bb470a2241568e210ad
|
||||
Approve:0x123ee47BaE3F64d422F2FB18ac444B47c1880F4C Tx: 0xa4d65095bbad39f9d625d8ca38f7def63bbce089020b721a70af52d253f61d64
|
||||
Approve:0x0ab8EF8B19655F32959c83e5fC5cD6536065D28f Tx: 0x1cd9b9ffe78a589f864d8a433e2409e79d163042f22719f43d72b183a394944d
|
||||
Approve:0x6462794c19e6b4543BEC56200212c7c746bbB9eB Tx: 0x8c0c314d652cf4527b38611f9c433756e509078c6491e81ae419aa5acdf8535c
|
||||
Approve:0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b Tx: 0x0090a4f02eebc8eab155bd94df6fd410d395fb8b83a537cd9970267a8f75fef9
|
||||
Approve:0x156595bAF85D5C29E91d959889B022d952190A64 Tx: 0x8f2570735caed9a65fde9971e657e6e1509335a4607ae576f97ad9f50ea47d69
|
||||
Create DVM: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b Pool:0xA24A179a4Dfc1C9A1DbC2a17db5A9A79dC935d88 Tx: 0x5bfdb7dfb3b65fd77a10b95f1e0d4c8ea2ad8bc6432257bba5bf138ba439016f
|
||||
Create DVM: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x156595bAF85D5C29E91d959889B022d952190A64 Pool:0x26115Cd3B06E2817E2Cb655199ccB58Ad4abdeDd Tx: 0xe9c558dbd3832936aa30fe588fad89a1b1e45d9f5e8241f44e765a76b7dcd670
|
||||
Create DVM: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b Pool:0xf54d43c419754b9C397e5a69CAf418bdC55EfEd5 Tx: 0x8208048cb3d0346826b574851a78e25548f74ab13048830e190950cc548d7119
|
||||
Create DVM: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x156595bAF85D5C29E91d959889B022d952190A64 Pool:0xf5a379A1EfAa8bF60839D633547A3cCA311df89b Tx: 0x3080dfe6d54c3883547010781eca1276feb9cb3c0f0066cae12caff19b55e228
|
||||
Create DPP: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b Pool:0xF00BEB2E974564B8867970FF8db7c0fFE0866c52 Tx: 0x214026df1fd2369c71d5050e6fa0060d3a55ec28f4d90f8696f2c4c517546914
|
||||
Create DPP: 0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE-0x156595bAF85D5C29E91d959889B022d952190A64 Pool:0x94648109F3DE33B2a04FbAE8Baf73F4Ea83ec259 Tx: 0xec487be5e60ad4614fa804c6798fe32ee5b87b6eb6b47f3d00435d220b8a9b84
|
||||
Create DPP: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b Pool:0x7e3261fEbD42a045429A7BfDF02307064034E157 Tx: 0x7412f7fbc70e236ffcd8a95193bfacc2926fc0dcfcc98cf0f507acb8489ece66
|
||||
Create DPP: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x156595bAF85D5C29E91d959889B022d952190A64 Pool:0x875bCf57CC98e7c6cfC1F7c80ca0fb2709Bc4F01 Tx: 0x1fe29cf3ff586e914c81f31291912be69a7d73a50396f986ddf143495d8ba3ac
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
const fs = require("fs");
|
||||
const Web3 = require('web3');
|
||||
const { deploySwitch } = require('../truffle-config.js')
|
||||
const file = fs.createWriteStream("../deploy-detail-v2.0.txt", { 'flags': 'a' });
|
||||
let logger = new console.Console(file, file);
|
||||
@@ -9,6 +10,7 @@ const ConstFeeRateModelTemplate = artifacts.require("ConstFeeRateModel");
|
||||
const PermissionManagerTemplate = artifacts.require("PermissionManager");
|
||||
const ExternalValueTemplate = artifacts.require("ExternalValue");
|
||||
|
||||
const ERC20Template = artifacts.require("InitializableERC20");
|
||||
const DvmTemplate = artifacts.require("DVM");
|
||||
const DppTemplate = artifacts.require("DPP");
|
||||
const DppAdminTemplate = artifacts.require("DPPAdmin");
|
||||
@@ -20,6 +22,7 @@ const CpFactory = artifacts.require("CrowdPoolingFactory");
|
||||
|
||||
const DODOApprove = artifacts.require("DODOApprove");
|
||||
const DODOProxyV2 = artifacts.require("DODOV2Proxy01");
|
||||
const DODOIncentive = artifacts.require("DODOIncentive");
|
||||
const DODOSellHelper = artifacts.require("DODOSellHelper");
|
||||
const DODOCalleeHelper = artifacts.require("DODOCalleeHelper");
|
||||
const DODOV2RouteHelper = artifacts.require("DODOV2RouteHelper");
|
||||
@@ -53,6 +56,9 @@ module.exports = async (deployer, network, accounts) => {
|
||||
let CpFactoryAddress = "";
|
||||
//Approve
|
||||
let DODOApproveAddress = "";
|
||||
//Incentive
|
||||
let DODOIncentiveAddress = "";
|
||||
let DODOTokenAddress = "";
|
||||
//Account
|
||||
let multiSigAddress = "";
|
||||
let defaultMaintainer = "";
|
||||
@@ -74,7 +80,7 @@ module.exports = async (deployer, network, accounts) => {
|
||||
// DefaultGasSourceAddress = "0xE0c0df0e0be7ec4f579503304a6C186cA4365407";
|
||||
DefaultMtFeeRateAddress = "0xEfdE4225AC747136289979e29f1236527b2E4DB1";
|
||||
DefaultPermissionAddress = "0xACc7E23368261e1E02103c4e5ae672E7D01f5797";
|
||||
|
||||
|
||||
DvmTemplateAddress = "";
|
||||
DppTemplateAddress = "";
|
||||
DppAdminTemplateAddress = "";
|
||||
@@ -85,6 +91,8 @@ module.exports = async (deployer, network, accounts) => {
|
||||
CpFactoryAddress = "";
|
||||
//Approve
|
||||
DODOApproveAddress = "";
|
||||
DODOIncentiveAddress = "";
|
||||
DODOTokenAddress = "0xfF2985D13953Cb92ecc585aA2B6A4AF8cB46068f";
|
||||
//Account
|
||||
multiSigAddress = accounts[0];
|
||||
defaultMaintainer = accounts[0];
|
||||
@@ -94,6 +102,7 @@ module.exports = async (deployer, network, accounts) => {
|
||||
WETHAddress = "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2";
|
||||
chiAddress = "0x0000000000004946c0e9F43F4Dee607b0eF1fA1c";
|
||||
DODOCalleeHelperAddress = "";
|
||||
DODORouteV2HelperAddress = "";
|
||||
//Template
|
||||
CloneFactoryAddress = "";
|
||||
// FeeRateModelTemplateAddress = "";
|
||||
@@ -115,6 +124,8 @@ module.exports = async (deployer, network, accounts) => {
|
||||
CpFactoryAddress = "";
|
||||
//Proxy
|
||||
DODOApproveAddress = "";
|
||||
DODOIncentiveAddress = "";
|
||||
DODOTokenAddress = "0x43Dfc4159D86F3A37A5A4B3D4580b888ad7d4DDd";
|
||||
//Account
|
||||
multiSigAddress = "0x95C4F5b83aA70810D4f142d58e5F7242Bd891CB0";
|
||||
defaultMaintainer = "0x95C4F5b83aA70810D4f142d58e5F7242Bd891CB0";
|
||||
@@ -124,6 +135,7 @@ module.exports = async (deployer, network, accounts) => {
|
||||
WETHAddress = "0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c";
|
||||
chiAddress = "0x0000000000000000000000000000000000000000";
|
||||
DODOCalleeHelperAddress = "";
|
||||
DODORouteV2HelperAddress = "";
|
||||
//Template
|
||||
CloneFactoryAddress = "";
|
||||
// FeeRateModelTemplateAddress = "";
|
||||
@@ -145,28 +157,20 @@ module.exports = async (deployer, network, accounts) => {
|
||||
CpFactoryAddress = "";
|
||||
//Proxy
|
||||
DODOApproveAddress = "";
|
||||
DODOIncentiveAddress = "";
|
||||
DODOTokenAddress = "";
|
||||
//Account
|
||||
multiSigAddress = "";
|
||||
defaultMaintainer = "";
|
||||
multiSigAddress = "0x4073f2b9bB95774531b9e23d206a308c614A943a";
|
||||
defaultMaintainer = "0x4073f2b9bB95774531b9e23d206a308c614A943a";
|
||||
} else return;
|
||||
|
||||
|
||||
if(deploySwitch.HELPER_V2) {
|
||||
logger.log("====================================================");
|
||||
logger.log("network type: " + network);
|
||||
logger.log("Deploy time: " + new Date().toLocaleString());
|
||||
logger.log("Deploy type: HELPER V2");
|
||||
|
||||
await deployer.deploy(DODOV2RouteHelper, "0xF2a62693FB14b326C3719e5aeEF28e8e66dC954e","0x58Bc8D248AcbE95CE29CF893C6666D58AF92d941");
|
||||
DODOV2RouteHelperAddress = DODOV2RouteHelper.address;
|
||||
logger.log("DODOV2RouteHelper Address: ", DODOV2RouteHelperAddress);
|
||||
}
|
||||
|
||||
if (deploySwitch.DEPLOY_V2) {
|
||||
logger.log("====================================================");
|
||||
logger.log("network type: " + network);
|
||||
logger.log("Deploy time: " + new Date().toLocaleString());
|
||||
logger.log("Deploy type: V2");
|
||||
if (DODOTokenAddress == "") return;
|
||||
|
||||
//Helper
|
||||
if (DODOSellHelperAddress == "") {
|
||||
await deployer.deploy(DODOSellHelper);
|
||||
@@ -262,6 +266,16 @@ module.exports = async (deployer, network, accounts) => {
|
||||
logger.log("DODOApprove Address: ", DODOApproveAddress);
|
||||
}
|
||||
|
||||
//Incentive
|
||||
if (DODOIncentiveAddress == "") {
|
||||
await deployer.deploy(DODOIncentive, DODOTokenAddress);
|
||||
DODOIncentiveAddress = DODOIncentive.address;
|
||||
logger.log("DODOIncentiveAddress: ", DODOIncentiveAddress);
|
||||
const DODOIncentiveInstance = await DODOIncentive.at(DODOIncentiveAddress);
|
||||
var tx = await DODOIncentiveInstance.initOwner(multiSigAddress);
|
||||
logger.log("DODOIncentive Init tx: ", tx.tx);
|
||||
}
|
||||
|
||||
//Factory
|
||||
if (DvmFactoryAddress == "") {
|
||||
await deployer.deploy(
|
||||
@@ -294,7 +308,7 @@ module.exports = async (deployer, network, accounts) => {
|
||||
var tx = await DppFactoryInstance.initOwner(multiSigAddress);
|
||||
logger.log("Init DppFactory Tx:", tx.tx);
|
||||
}
|
||||
|
||||
|
||||
if (CpFactoryAddress == "") {
|
||||
await deployer.deploy(
|
||||
CpFactory,
|
||||
@@ -323,16 +337,41 @@ module.exports = async (deployer, network, accounts) => {
|
||||
CpFactoryAddress,
|
||||
WETHAddress,
|
||||
DODOApproveAddress,
|
||||
DODOSellHelperAddress
|
||||
DODOSellHelperAddress,
|
||||
chiAddress,
|
||||
DODOIncentiveAddress
|
||||
);
|
||||
logger.log("DODOProxyV2 Address: ", DODOProxyV2.address);
|
||||
const DODOProxyV2Instance = await DODOProxyV2.at(DODOProxyV2.address);
|
||||
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);
|
||||
var tx = await DODOApproveInstance.init(multiSigAddress, DODOProxyV2.address);
|
||||
logger.log("DODOApprove Init tx: ", tx.tx);
|
||||
|
||||
|
||||
if (network == 'kovan') {
|
||||
//1. Proxy whiteList
|
||||
|
||||
//2. ChangeDODO Incentive proxy
|
||||
const DODOIncentiveInstance = await DODOIncentive.at(DODOIncentiveAddress);
|
||||
var tx = await DODOIncentiveInstance.changeDODOProxy(DODOProxyV2.address);
|
||||
logger.log("DODOIncentive ChangeProxy tx: ", tx.tx);
|
||||
|
||||
//3. Open trade incentive
|
||||
// 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)
|
||||
// const blockNum = await web3.eth.getBlockNumber();
|
||||
// var tx = await DODOIncentiveInstance.switchIncentive(blockNum + 1);
|
||||
// logger.log("DODOIncentive OpenSwitch tx: ", tx.tx);
|
||||
|
||||
//4. Transfer DODO to Trade Incentive
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
|
||||
@@ -13,54 +13,48 @@ const DVMFactory = artifacts.require("DVMFactory");
|
||||
const DPPFactory = artifacts.require("DPPFactory");
|
||||
|
||||
const POOL_PARAM = [
|
||||
// {
|
||||
// baseAddr: "0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE", //ABC0
|
||||
// quoteAddr: "0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e", //USDC
|
||||
// lpFeeRate: "3000000000000000", //0.003
|
||||
// mtFeeRate: "1000000000000000", //0.001
|
||||
// i: "10000000", //10
|
||||
// k: "500000000000000000" //0.5
|
||||
// },
|
||||
// {
|
||||
// baseAddr: "0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE", //ABC0
|
||||
// quoteAddr: "0x156595bAF85D5C29E91d959889B022d952190A64", //USDT
|
||||
// lpFeeRate: "3000000000000000", //0.003
|
||||
// mtFeeRate: "1000000000000000", //0.001
|
||||
// i: "10000000", //10
|
||||
// k: "0" //0
|
||||
// },
|
||||
// {
|
||||
// baseAddr: "0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA", //ABC1
|
||||
// quoteAddr: "0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e", //USDC
|
||||
// lpFeeRate: "3000000000000000", //0.003
|
||||
// mtFeeRate: "1000000000000000", //0.001
|
||||
// i: "5000000", //5
|
||||
// k: "1000000000000000000" //1
|
||||
// },
|
||||
// {
|
||||
// baseAddr: "0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA", //ABC1
|
||||
// quoteAddr: "0x156595bAF85D5C29E91d959889B022d952190A64", //USDT
|
||||
// lpFeeRate: "3000000000000000", //0.003
|
||||
// mtFeeRate: "1000000000000000", //0.001
|
||||
// i: "8000000", //8
|
||||
// k: "900000000000000000" //0.9
|
||||
// },
|
||||
{
|
||||
baseAddr: "0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE", //ABC0
|
||||
quoteAddr: "0x5eca15b12d959dfcf9c71c59f8b467eb8c6efd0b", //WETH
|
||||
quoteAddr: "0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b", //USDC
|
||||
lpFeeRate: "0", //0
|
||||
i: "10000000", //10
|
||||
k: "500000000000000000" //0.5
|
||||
},
|
||||
{
|
||||
baseAddr: "0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE", //ABC0
|
||||
quoteAddr: "0x156595bAF85D5C29E91d959889B022d952190A64", //USDT
|
||||
lpFeeRate: "3000000000000000", //0.003
|
||||
mtFeeRate: "1000000000000000", //0.001
|
||||
i: "45000000000000000000", //45
|
||||
k: "800000000000000000" //0.8
|
||||
i: "10000000", //10
|
||||
k: "0" //0
|
||||
},
|
||||
{
|
||||
baseAddr: "0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA", //ABC1
|
||||
quoteAddr: "0x5eca15b12d959dfcf9c71c59f8b467eb8c6efd0b", //WETH
|
||||
lpFeeRate: "3000000000000000", //0.003
|
||||
mtFeeRate: "1000000000000000", //0.001
|
||||
i: "30000000000000000000", //30
|
||||
k: "300000000000000000" //0.3
|
||||
quoteAddr: "0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b", //USDC
|
||||
lpFeeRate: "0", //0
|
||||
i: "5000000", //5
|
||||
k: "1000000000000000000" //1
|
||||
},
|
||||
{
|
||||
baseAddr: "0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA", //ABC1
|
||||
quoteAddr: "0x156595bAF85D5C29E91d959889B022d952190A64", //USDT
|
||||
lpFeeRate: "3000000000000000", //0.003
|
||||
i: "8000000", //8
|
||||
k: "900000000000000000" //0.9
|
||||
},
|
||||
// {
|
||||
// baseAddr: "0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE", //ABC0
|
||||
// quoteAddr: "0x5eca15b12d959dfcf9c71c59f8b467eb8c6efd0b", //WETH
|
||||
// lpFeeRate: "3000000000000000", //0.003
|
||||
// i: "45000000000000000000", //45
|
||||
// k: "800000000000000000" //0.8
|
||||
// },
|
||||
// {
|
||||
// baseAddr: "0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA", //ABC1
|
||||
// quoteAddr: "0x5eca15b12d959dfcf9c71c59f8b467eb8c6efd0b", //WETH
|
||||
// lpFeeRate: "0", //0.003
|
||||
// i: "30000000000000000000", //30
|
||||
// k: "300000000000000000" //0.3
|
||||
// },
|
||||
];
|
||||
|
||||
module.exports = async (deployer, network, accounts) => {
|
||||
@@ -70,10 +64,10 @@ module.exports = async (deployer, network, accounts) => {
|
||||
let MintableERC20TemplateAddress = "0xA45a64DAba80757432fA4d654Df12f65f020C13C";
|
||||
let ERC20FactoryAddress = "0xCb1A2f64EfB02803276BFB5a8D511C4D950282a0";
|
||||
|
||||
let DPPFactoryAddress = "0x58Bc8D248AcbE95CE29CF893C6666D58AF92d941";
|
||||
let DVMFactoryAddress = "0xF2a62693FB14b326C3719e5aeEF28e8e66dC954e";
|
||||
let DODOApproveAddress = "0xeEA9F08eBfde6915AB1C0051F3eB2612DbA95d5D";
|
||||
let DODOProxyV2Address = "0x97B779AD504bbd5b1BFB50e57584a876Dc65171a";
|
||||
let DPPFactoryAddress = "0x6D4a70354cd03ae3A8461eDE9A4dAd445a169a6B";
|
||||
let DVMFactoryAddress = "0x0ac46584e4566d5841E7D708Ab4D92Ef191fFe37";
|
||||
let DODOApproveAddress = "0xe51d8085aB43AC8BC98e965b2F7B79b998c23814";
|
||||
let DODOProxyV2Address = "0xB035847e685925647AaA8b9d74e3bFF36f81EBcB";
|
||||
|
||||
const provider = new Web3.providers.HttpProvider("https://kovan.infura.io/v3/22d4a3b2df0e47b78d458f43fe50a199");
|
||||
|
||||
@@ -104,7 +98,7 @@ module.exports = async (deployer, network, accounts) => {
|
||||
const DODOProxyV2Instance = await DODOProxyV2.at(DODOProxyV2Address);
|
||||
var tx = await DODOProxyV2Instance.dodoSwapV2TokenToToken(
|
||||
accounts[0],
|
||||
"0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e",
|
||||
"0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b",
|
||||
"0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE",
|
||||
web3.utils.toWei("10", 'mwei'),
|
||||
0,
|
||||
@@ -125,7 +119,7 @@ module.exports = async (deployer, network, accounts) => {
|
||||
const token3Addr = "0x123ee47BaE3F64d422F2FB18ac444B47c1880F4C";
|
||||
const token4Addr = "0x0ab8EF8B19655F32959c83e5fC5cD6536065D28f";
|
||||
const token5Addr = "0x6462794c19e6b4543BEC56200212c7c746bbB9eB";
|
||||
const quote0Addr = "0x69c8a7fc6e05d7aa36114b3e35f62deca8e11f6e";
|
||||
const quote0Addr = "0x43688f367eb83697c3ca5d03c5055b6bd6f6ac4b";
|
||||
const quote1Addr = "0x156595bAF85D5C29E91d959889B022d952190A64";
|
||||
const token0 = await ERC20Template.at(token0Addr);
|
||||
const token1 = await ERC20Template.at(token1Addr);
|
||||
@@ -158,14 +152,13 @@ module.exports = async (deployer, network, accounts) => {
|
||||
const DPPFactoryInstance = await DPPFactory.at(DPPFactoryAddress);
|
||||
|
||||
const assetTo = accounts[0];
|
||||
const baseInAmount = web3.utils.toWei("1000", 'ether');
|
||||
// const quoteInAmount = web3.utils.toWei("100", 'mwei');
|
||||
const quoteInAmount = web3.utils.toWei("0", 'ether');
|
||||
const baseInAmount = web3.utils.toWei("100000", 'ether');
|
||||
const quoteInAmount = web3.utils.toWei("10000", 'mwei');
|
||||
// const quoteInAmount = web3.utils.toWei("0", 'ether');
|
||||
const deadline = Math.floor(new Date().getTime() / 1000 + 60 * 10);
|
||||
//DVM Pool
|
||||
for (var i = 0; i < POOL_PARAM.length; i++) {
|
||||
tx = await DODOProxyV2Instance.createDODOVendingMachine(
|
||||
assetTo,
|
||||
POOL_PARAM[i].baseAddr,
|
||||
POOL_PARAM[i].quoteAddr,
|
||||
baseInAmount,
|
||||
@@ -226,11 +219,11 @@ module.exports = async (deployer, network, accounts) => {
|
||||
|
||||
const ERC20FactoryInstance = await ERC20Factory.at(ERC20FactoryAddress);
|
||||
|
||||
const totalSupply = web3.utils.toWei("100000000", 'mwei');
|
||||
for (let i = 0; i < 8; i++) {
|
||||
var tx = await ERC20FactoryInstance.createStdERC20(totalSupply, 'ABC Token', 'ABC' + i, 18);
|
||||
const totalSupply = web3.utils.toWei("1000000000", 'ether');
|
||||
for (let i = 0; i < 1; i++) {
|
||||
var tx = await ERC20FactoryInstance.createStdERC20(totalSupply, 'DODO Bird', 'DODO', 18);
|
||||
// var tx = await ERC20FactoryInstance.createStdERC20(totalSupply, 'USDT Token', 'USDT', 6);
|
||||
logger.log("ERC20 address: ", tx.logs[0].args['erc20'] + "; Symbol:" + 'ABC' + i);
|
||||
logger.log("ERC20 address: ", tx.logs[0].args['erc20'] + "; Symbol:" + 'DODO');
|
||||
// logger.log("ERC20 address: ", tx.logs[0].args['erc20'] + "; Symbol:" + 'USDT');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,6 @@ module.exports = {
|
||||
MOCK_TOKEN: false,
|
||||
MOCK_V2_POOL: false,
|
||||
MOCK_V2_SWAP: false,
|
||||
HELPER_V2: false,
|
||||
MANUAL_ADD_POOL: false
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user