update arb contract info
This commit is contained in:
@@ -1,63 +1,70 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
ARB_CONFIG: {
|
ARB_CONFIG: {
|
||||||
|
//DODOV1
|
||||||
|
//DODO: 0xe33c4f54212E6690E923c39aB6fB9eC9E36c7735,
|
||||||
|
//DODOZoo: 0xBcC3401E16C25EaF4d3FeD632ce3288503883B1f
|
||||||
|
|
||||||
//TOKEN
|
//TOKEN
|
||||||
WETH: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
WETH: "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
|
||||||
CHI: "0x0000000000000000000000000000000000000000",
|
CHI: "0x0000000000000000000000000000000000000000",
|
||||||
DODO: "0x69Eb4FA4a2fbd498C257C57Ea8b7655a2559A581",
|
DODO: "0x69Eb4FA4a2fbd498C257C57Ea8b7655a2559A581",
|
||||||
|
|
||||||
//Helper
|
//Helper
|
||||||
DODOSellHelper: "0x18AA6Bb215CDBd179E7beAE10F66C21B26971306",
|
DODOSellHelper: "0xA5F36E822540eFD11FcD77ec46626b916B217c3e",
|
||||||
DODOCalleeHelper: "0xe3B40F8D8346d428EAB28d9Fd672b784d921cfBD",
|
DODOCalleeHelper: "0xe3B40F8D8346d428EAB28d9Fd672b784d921cfBD",
|
||||||
DODOV1PmmHelper: "0x4EE6398898F7FC3e648b3f6bA458310ac29cD352",
|
DODOV1PmmHelper: "0x4EE6398898F7FC3e648b3f6bA458310ac29cD352",
|
||||||
DODOV2RouteHelper: "0xd72b354BD39f8F11D0cA07bD5724896Bb1a42707",
|
DODOV2RouteHelper: "0xBE24a05a317ED701630EE503F0C59A01e4B0c88C",
|
||||||
CurveSample: "",
|
ERC20Helper: "0x7C062B9C584fA6eC2504270790D38240A2c5fE72",
|
||||||
|
DODOSwapCalcHelper: "0xd7863Aee0B7A312F2c055B441253d66AFac8d144",
|
||||||
|
MultiCall: "0xF718F2bd590E5621e53f7b89398e52f7Acced8ca",
|
||||||
|
CurveSample: "0x17307DA6c27BeAaDCcC1C7Ca7456cA1fBa10b9CF",
|
||||||
|
|
||||||
|
|
||||||
//Template
|
//Template
|
||||||
CloneFactory: "0x1ddD02f6d31C1eF04cFA0a1AA811406B5B2884E7",
|
CloneFactory: "0x1ddD02f6d31C1eF04cFA0a1AA811406B5B2884E7",
|
||||||
FeeRateModel: "0xD56281EF996B6B29874C77D2e1464216E8043127",
|
FeeRateModel: "0x668E7f4d8051511279d3BD6d6854e7D39cc94873",
|
||||||
PermissionManager: "0x61b21603A527b487C4a3A80a69224b87751D0F6a",
|
FeeRateDIP3: "0xc6DE76f82a3456D75212a454E83B37659886e190",
|
||||||
|
PermissionManager: "0xb8132c7112aAf11fed09c7218AD2fcB42Da84773",
|
||||||
DVM: "0x790B4A80Fb1094589A3c0eFC8740aA9b0C1733fB",
|
DVM: "0x790B4A80Fb1094589A3c0eFC8740aA9b0C1733fB",
|
||||||
DPP: "0x1565666CD77bB6DDE193e1D37Ad7b07900e6f4c0",
|
DPP: "0xFF83897590Ac2f48aDFdEb9f497fe68A34B893C0",
|
||||||
DSP: "0x778DF5B12170e8af8dF94356BfC864E57CE185DC",
|
DSP: "0xD0751f77d36aDaBA0067a151a8cF11475880c874",
|
||||||
|
|
||||||
DPPAdmin: "0x1dc8D1f1600B7C1D39e6b60FBC7b021Bc4F9C993",
|
DPPAdmin: "0x1dc8D1f1600B7C1D39e6b60FBC7b021Bc4F9C993",
|
||||||
CP: "0xF7345452fE13A516974d2DdA279dE55DE5D11Ea2",
|
CP: "0xC39EE45A98d16D4587bB60596a22973b5d71AA3a",
|
||||||
|
ERC20MineV2: "0xe91067189C71dB0696bD6fBC14535CB159F98b5C",
|
||||||
ERC20MineV3: "0x973CAB76C35BB1da47e044A63546c69A8Ac1143c",
|
ERC20MineV3: "0x973CAB76C35BB1da47e044A63546c69A8Ac1143c",
|
||||||
ERC20: "0xBb245F54569841906eC7eDFFf72a910557B81378",
|
ERC20: "0xBb245F54569841906eC7eDFFf72a910557B81378",
|
||||||
MintableERC20: "0x70eFB31271C0796833f80dA4E6538d05B2AFA72C",
|
|
||||||
CustomERC20: "0xcE2a934933465E187c95AcAce60BC650a06aD373",
|
CustomERC20: "0xcE2a934933465E187c95AcAce60BC650a06aD373",
|
||||||
|
|
||||||
//Factory
|
//Factory
|
||||||
DVMFactory: "0xb0C7cB15b52b0093130487209e96CFeC0Ba4Ff66",
|
DVMFactory: "0xDa4c4411c55B0785e501332354A036c04833B72b",
|
||||||
DPPFactory: "0xF0B4338E3e3dfE9B6934FD68697ba8cF1055A1aD",
|
DPPFactory: "0xDdB13e6dd168E1a68DC2285Cb212078ae10394A9",
|
||||||
DSPFactory: "0xa1254eE5c6d6616904A82c55C6e134557096B6D4",
|
DSPFactory: "0xC8fE2440744dcd733246a4dB14093664DEFD5A53",
|
||||||
UpCpFactory: "0x69f52AC40185A2A005D49114F0B77b7bA856F0a0",
|
UpCpFactory: "0xE92787F457F541a9D5Ae17C1dbdBffA8D3BA3C25",
|
||||||
CrowdPoolingFactory: "0x884E3EE9e25896c57E7d8d6FAACef22B02BCD6bE",
|
CrowdPoolingFactory: "0x6E5f239f729c83E976a7A280F81Dd1685dd89218",
|
||||||
ERC20Factory: "0x141b4497a298340E8B451ac4eeE947B00aDbe07A",
|
ERC20V2Factory: "0x750B153E6a69DCA16eb12D5aEdDFD80ca3f10d1C",
|
||||||
ERC20V2Factory: "0xE3c91fDCe30DD5Aa95138D6c4d63f43a26e9066e",
|
DODOMineV2Factory: "0x5a2E2278A0fACcf224cEd1ce809eC4e4b1708759",
|
||||||
DODOMineV3Registry: "0xf6585FE94f2147682723FCdFFb973757BCdB608F",
|
DODOMineV3Registry: "0x2B40bC6c9C12c18787436aa1E2B761f684F42999",
|
||||||
|
|
||||||
//Approve
|
//Approve
|
||||||
DODOApprove: "0xCDFD45f965De9932367833Ca7187e4c9C43A2380",
|
DODOApprove: "0xA867241cDC8d3b0C07C85cC06F25a0cD3b5474d8",
|
||||||
DODOApproveProxy: "0x0fe261aeE0d1C4DFdDee4102E82Dd425999065F4",
|
DODOApproveProxy: "0x311E670c3305a0BD55184c1C6580eBeA1FA611F0",
|
||||||
|
|
||||||
//Adapter
|
//Adapter
|
||||||
DODOV1Adapter: "0xd5a7E197bacE1F3B26E2760321d6ce06Ad07281a",
|
DODOV1Adapter: "0xd5a7E197bacE1F3B26E2760321d6ce06Ad07281a",
|
||||||
DODOV2Adapter: "0x8aB2D334cE64B50BE9Ab04184f7ccBa2A6bb6391",
|
DODOV2Adapter: "0x8aB2D334cE64B50BE9Ab04184f7ccBa2A6bb6391",
|
||||||
UniAdapter: "0x17eBC315760Bb47384224A5f3BF829222fbD3Aa7",
|
UniAdapter: "0x17eBC315760Bb47384224A5f3BF829222fbD3Aa7",
|
||||||
CurveAdapter: "",
|
CurveAdapter: "0x57a046AC05185ba2AbdD3C480567A35bd1Ac9711",
|
||||||
|
|
||||||
|
|
||||||
//Proxy
|
//Proxy
|
||||||
DODOV2Proxy: "0xeCEaDe494FD5F913Fd937C5CAc4577236395Dc32",
|
DODOV2Proxy: "0x88CBf433471A0CD8240D2a12354362988b4593E5",
|
||||||
DSPProxy: "0x3a343F2e4e142412c5dD130359edb765a6054965",
|
DSPProxy: "0x36E5238B4479d1ba0bFE47550B0B8e4f4f500EAA",
|
||||||
CpProxy: "0x2cD18557E14aF72DAA8090BcAA95b231ffC9ea26",
|
CpProxy: "0x074890524059905096caA0D1A7B5715C6203c155",
|
||||||
RouteProxy: "0x3E64F18168651d140AaE57e0cF325874d066bA9E",
|
RouteProxy: "0x3B6067D4CAa8A14c63fdBE6318F27A0bBc9F9237",
|
||||||
DODOMineV3Proxy: "0x579D25c519de3235aeD83A277E67c6420d9Fd1bE",
|
DODOMineV3Proxy: "0x9A74B169798bE874EF1C23b4092e5689969eF45E",
|
||||||
|
|
||||||
//Account
|
//Account
|
||||||
multiSigAddress: "0x1e0D4043C0CD3ed15F3c2AfE60B0F213c9b5E30d",
|
multiSigAddress: "0x01d3E7271c278Aa3AA56EeBa6a109b2C200679fA",
|
||||||
defaultMaintainer: "0x1e0D4043C0CD3ed15F3c2AfE60B0F213c9b5E30d",
|
defaultMaintainer: "0x01d3E7271c278Aa3AA56EeBa6a109b2C200679fA"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -65,5 +65,9 @@ module.exports = {
|
|||||||
//Account
|
//Account
|
||||||
multiSigAddress: "0x95C4F5b83aA70810D4f142d58e5F7242Bd891CB0",
|
multiSigAddress: "0x95C4F5b83aA70810D4f142d58e5F7242Bd891CB0",
|
||||||
defaultMaintainer: "0x95C4F5b83aA70810D4f142d58e5F7242Bd891CB0",
|
defaultMaintainer: "0x95C4F5b83aA70810D4f142d58e5F7242Bd891CB0",
|
||||||
|
|
||||||
|
|
||||||
|
//============= NFT ================
|
||||||
|
DodoNftErc721: "0x945497d9A3e0C1600478e466E2a38Ff8E1623E55",
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -22,7 +22,7 @@ module.exports = {
|
|||||||
DSP: "0xbe9a66e49503e84ae59a4d0545365AABedf33b40",
|
DSP: "0xbe9a66e49503e84ae59a4d0545365AABedf33b40",
|
||||||
|
|
||||||
DPPAdmin: "0xB5Dc5E183c2aCf02aB879A8569aB4EDAf147d537",
|
DPPAdmin: "0xB5Dc5E183c2aCf02aB879A8569aB4EDAf147d537",
|
||||||
CP: "0xf50BDc9E90B7a1c138cb7935071b85c417C4cb8e",
|
CP: "0x4BFa49b0a0B6B08D3D82b8AB45feC0c737880155",
|
||||||
ERC20MineV3: "0xda59427Bd9d4827Ec9f751719eb79b0a3e74FA4D",
|
ERC20MineV3: "0xda59427Bd9d4827Ec9f751719eb79b0a3e74FA4D",
|
||||||
ERC20: "0x34b9Dc29AaDc313F2BF828B7Be1e0DEe393D28e3",
|
ERC20: "0x34b9Dc29AaDc313F2BF828B7Be1e0DEe393D28e3",
|
||||||
MintableERC20: "0x7737fd30535c69545deeEa54AB8Dd590ccaEBD3c",
|
MintableERC20: "0x7737fd30535c69545deeEa54AB8Dd590ccaEBD3c",
|
||||||
|
|||||||
@@ -6,33 +6,42 @@ const { GetConfig } = require("../configAdapter.js")
|
|||||||
|
|
||||||
const CloneFactory = artifacts.require("CloneFactory");
|
const CloneFactory = artifacts.require("CloneFactory");
|
||||||
const FeeRateModelTemplate = artifacts.require("FeeRateModel");
|
const FeeRateModelTemplate = artifacts.require("FeeRateModel");
|
||||||
|
const FeeRateDIP3 = artifacts.require("FeeRateDIP3Impl");
|
||||||
const PermissionManagerTemplate = artifacts.require("PermissionManager");
|
const PermissionManagerTemplate = artifacts.require("PermissionManager");
|
||||||
const DODOSellHelper = artifacts.require("DODOSellHelper");
|
const DODOSellHelper = artifacts.require("DODOSellHelper");
|
||||||
const DODOCalleeHelper = artifacts.require("DODOCalleeHelper");
|
|
||||||
const DODOV1PmmHelper = artifacts.require("DODOV1PmmHelper");
|
const DODOV1PmmHelper = artifacts.require("DODOV1PmmHelper");
|
||||||
const DODOV2RouteHelper = artifacts.require("DODOV2RouteHelper");
|
const DODOV2RouteHelper = artifacts.require("DODOV2RouteHelper");
|
||||||
|
const DODOSwapCalcHelper = artifacts.require("DODOSwapCalcHelper");
|
||||||
|
const ERC20Helper = artifacts.require("ERC20Helper");
|
||||||
|
const MultiCall = artifacts.require("Multicall");
|
||||||
|
const DODOCalleeHelper = artifacts.require("DODOCalleeHelper");
|
||||||
|
|
||||||
const DvmTemplate = artifacts.require("DVM");
|
const DvmTemplate = artifacts.require("DVM");
|
||||||
const DppTemplate = artifacts.require("DPP");
|
|
||||||
const DspTemplate = artifacts.require("DSP");
|
const DspTemplate = artifacts.require("DSP");
|
||||||
|
const DppTemplate = artifacts.require("DPP");
|
||||||
const DppAdminTemplate = artifacts.require("DPPAdmin");
|
const DppAdminTemplate = artifacts.require("DPPAdmin");
|
||||||
const CpTemplate = artifacts.require("CP");
|
const CpTemplate = artifacts.require("CP");
|
||||||
|
|
||||||
const ERC20Template = artifacts.require("InitializableERC20");
|
const ERC20Template = artifacts.require("InitializableERC20");
|
||||||
const MintableERC20Template = artifacts.require("InitializableMintableERC20");
|
const CustomERC20Template = artifacts.require("CustomERC20");
|
||||||
const ERC20Factory = artifacts.require("ERC20Factory");
|
const ERC20MineV2 = artifacts.require("ERC20Mine");
|
||||||
|
const ERC20MineV3 = artifacts.require("ERC20MineV3");
|
||||||
|
|
||||||
|
const ERC20V2Factory = artifacts.require("ERC20V2Factory");
|
||||||
const DvmFactory = artifacts.require("DVMFactory");
|
const DvmFactory = artifacts.require("DVMFactory");
|
||||||
const DppFactory = artifacts.require("DPPFactory");
|
const DppFactory = artifacts.require("DPPFactory");
|
||||||
const DspFactory = artifacts.require("DSPFactory");
|
const DspFactory = artifacts.require("DSPFactory");
|
||||||
const CpFactory = artifacts.require("CrowdPoolingFactory");
|
const CpFactory = artifacts.require("CrowdPoolingFactory");
|
||||||
const UpCpFactory = artifacts.require("UpCrowdPoolingFactory");
|
const UpCpFactory = artifacts.require("UpCrowdPoolingFactory");
|
||||||
|
const MineV3Registry = artifacts.require("DODOMineV3Registry");
|
||||||
|
const MineV2Factory = artifacts.require("DODOMineV2Factory");
|
||||||
|
|
||||||
const DODOApprove = artifacts.require("DODOApprove");
|
const DODOApprove = artifacts.require("DODOApprove");
|
||||||
const DODOApproveProxy = artifacts.require("DODOApproveProxy");
|
const DODOApproveProxy = artifacts.require("DODOApproveProxy");
|
||||||
|
|
||||||
const DODODspProxy = artifacts.require("DODODspProxy");
|
const DODODspProxy = artifacts.require("DODODspProxy");
|
||||||
const DODOCpProxy = artifacts.require("DODOCpProxy");
|
const DODOCpProxy = artifacts.require("DODOCpProxy");
|
||||||
|
const DODORouteProxy = artifacts.require("DODORouteProxy");
|
||||||
|
const DODOMineV3Proxy = artifacts.require("DODOMineV3Proxy");
|
||||||
const DODOProxyV2 = artifacts.require("DODOV2Proxy02");
|
const DODOProxyV2 = artifacts.require("DODOV2Proxy02");
|
||||||
|
|
||||||
const DODOV1Adapter = artifacts.require("DODOV1Adapter");
|
const DODOV1Adapter = artifacts.require("DODOV1Adapter");
|
||||||
@@ -51,10 +60,14 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
let DODOCalleeHelperAddress = CONFIG.DODOCalleeHelper;
|
let DODOCalleeHelperAddress = CONFIG.DODOCalleeHelper;
|
||||||
let DODORouteV2HelperAddress = CONFIG.DODOV2RouteHelper;
|
let DODORouteV2HelperAddress = CONFIG.DODOV2RouteHelper;
|
||||||
let DODOV1PmmHelperAddress = CONFIG.DODOV1PmmHelper;
|
let DODOV1PmmHelperAddress = CONFIG.DODOV1PmmHelper;
|
||||||
|
let DODOSwapCalcHelperAddress = CONFIG.DODOSwapCalcHelper;
|
||||||
|
let ERC20HelperAddress = CONFIG.ERC20Helper;
|
||||||
|
let MultiCallAddress = CONFIG.MultiCall;
|
||||||
|
|
||||||
//Template
|
//Template
|
||||||
let CloneFactoryAddress = CONFIG.CloneFactory;
|
let CloneFactoryAddress = CONFIG.CloneFactory;
|
||||||
let DefaultMtFeeRateAddress = CONFIG.FeeRateModel;
|
let DefaultMtFeeRateAddress = CONFIG.FeeRateModel;
|
||||||
|
let FeeRateDIP3Address = CONFIG.FeeRateDIP3;
|
||||||
let DefaultPermissionAddress = CONFIG.PermissionManager;
|
let DefaultPermissionAddress = CONFIG.PermissionManager;
|
||||||
let DvmTemplateAddress = CONFIG.DVM;
|
let DvmTemplateAddress = CONFIG.DVM;
|
||||||
let DspTemplateAddress = CONFIG.DSP;
|
let DspTemplateAddress = CONFIG.DSP;
|
||||||
@@ -62,7 +75,9 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
let DppAdminTemplateAddress = CONFIG.DPPAdmin;
|
let DppAdminTemplateAddress = CONFIG.DPPAdmin;
|
||||||
let CpTemplateAddress = CONFIG.CP;
|
let CpTemplateAddress = CONFIG.CP;
|
||||||
let ERC20TemplateAddress = CONFIG.ERC20;
|
let ERC20TemplateAddress = CONFIG.ERC20;
|
||||||
let MintableERC20TemplateAddress = CONFIG.MintableERC20;
|
let CustomERC20TemplateAddress = CONFIG.CustomERC20;
|
||||||
|
let MineV2TemplateAddress = CONFIG.ERC20MineV2;
|
||||||
|
let MineV3TemplateAddress = CONFIG.ERC20MineV3;
|
||||||
|
|
||||||
//Facotry
|
//Facotry
|
||||||
let DvmFactoryAddress = CONFIG.DVMFactory;
|
let DvmFactoryAddress = CONFIG.DVMFactory;
|
||||||
@@ -70,31 +85,32 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
let DppFactoryAddress = CONFIG.DPPFactory;
|
let DppFactoryAddress = CONFIG.DPPFactory;
|
||||||
let CpFactoryAddress = CONFIG.CrowdPoolingFactory;
|
let CpFactoryAddress = CONFIG.CrowdPoolingFactory;
|
||||||
let UpCpFactoryAddress = CONFIG.UpCpFactory;
|
let UpCpFactoryAddress = CONFIG.UpCpFactory;
|
||||||
let ERC20FactoryAddress = CONFIG.ERC20Factory;
|
let ERC20V2FactoryAddress = CONFIG.ERC20V2Factory;
|
||||||
|
let DODOMineV3RegistryAddress = CONFIG.DODOMineV3Registry;
|
||||||
|
let DODOMineV2FactoryAddress = CONFIG.DODOMineV2Factory;
|
||||||
|
|
||||||
//Approve
|
//Approve
|
||||||
let DODOApproveAddress = CONFIG.DODOApprove;
|
let DODOApproveAddress = CONFIG.DODOApprove;
|
||||||
let DODOApproveProxyAddress = CONFIG.DODOApproveProxy;
|
let DODOApproveProxyAddress = CONFIG.DODOApproveProxy;
|
||||||
|
|
||||||
|
//Adapter
|
||||||
|
let DODOV1AdpaterAddress = CONFIG.DODOV1Adapter;
|
||||||
|
let DODOV2AdapterAddress = CONFIG.DODOV2Adapter;
|
||||||
|
let UniAdapterAddress = CONFIG.UniAdapter;
|
||||||
|
|
||||||
|
//Proxy
|
||||||
|
let DODOV2ProxyAddress = CONFIG.DODOV2Proxy;
|
||||||
|
let DODODspProxyAddress = CONFIG.DSPProxy;
|
||||||
|
let DODOCpProxyAddress = CONFIG.CpProxy;
|
||||||
|
let DODOMineV3ProxyAddress = CONFIG.DODOMineV3Proxy;
|
||||||
|
let DODORouteProxyAddress = CONFIG.RouteProxy;
|
||||||
|
|
||||||
|
|
||||||
//Account
|
//Account
|
||||||
let multiSigAddress = CONFIG.multiSigAddress;
|
let multiSigAddress = CONFIG.multiSigAddress;
|
||||||
let defaultMaintainer = CONFIG.defaultMaintainer;
|
let defaultMaintainer = CONFIG.defaultMaintainer;
|
||||||
|
|
||||||
|
|
||||||
if (deploySwitch.ADAPTER) {
|
|
||||||
logger.log("====================================================");
|
|
||||||
logger.log("network type: " + network);
|
|
||||||
logger.log("Deploy time: " + new Date().toLocaleString());
|
|
||||||
logger.log("Deploy type: V2 - Adapter");
|
|
||||||
|
|
||||||
await deployer.deploy(DODOV1Adapter, DODOSellHelperAddress)
|
|
||||||
logger.log("DODOV1Adapter Address: ", DODOV1Adapter.address);
|
|
||||||
await deployer.deploy(DODOV2Adapter)
|
|
||||||
logger.log("DODOV2Adapter Address: ", DODOV2Adapter.address);
|
|
||||||
await deployer.deploy(UniAdapter)
|
|
||||||
logger.log("UniAdapter Address: ", UniAdapter.address);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (deploySwitch.DEPLOY_V2) {
|
if (deploySwitch.DEPLOY_V2) {
|
||||||
logger.log("====================================================");
|
logger.log("====================================================");
|
||||||
logger.log("network type: " + network);
|
logger.log("network type: " + network);
|
||||||
@@ -103,11 +119,28 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
logger.log("multiSigAddress: ", multiSigAddress)
|
logger.log("multiSigAddress: ", multiSigAddress)
|
||||||
|
|
||||||
//Helper
|
//Helper
|
||||||
|
if (MultiCallAddress == "") {
|
||||||
|
await deployer.deploy(MultiCall);
|
||||||
|
MultiCallAddress = MultiCall.address;
|
||||||
|
logger.log("MultiCallAddress: ", MultiCallAddress);
|
||||||
|
}
|
||||||
|
|
||||||
if (DODOSellHelperAddress == "") {
|
if (DODOSellHelperAddress == "") {
|
||||||
await deployer.deploy(DODOSellHelper);
|
await deployer.deploy(DODOSellHelper);
|
||||||
DODOSellHelperAddress = DODOSellHelper.address;
|
DODOSellHelperAddress = DODOSellHelper.address;
|
||||||
logger.log("DODOSellHelper Address: ", DODOSellHelperAddress);
|
logger.log("DODOSellHelper Address: ", DODOSellHelperAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DODOSwapCalcHelperAddress == "") {
|
||||||
|
await deployer.deploy(DODOSwapCalcHelper, DODOSellHelperAddress);
|
||||||
|
logger.log("DODOSwapCalcHelper Address: ", DODOSwapCalcHelper.address);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ERC20HelperAddress == "") {
|
||||||
|
await deployer.deploy(ERC20Helper);
|
||||||
|
logger.log("ERC20Helper Address: ", ERC20Helper.address);
|
||||||
|
}
|
||||||
|
|
||||||
if (DODOCalleeHelperAddress == "") {
|
if (DODOCalleeHelperAddress == "") {
|
||||||
await deployer.deploy(DODOCalleeHelper, WETHAddress);
|
await deployer.deploy(DODOCalleeHelper, WETHAddress);
|
||||||
DODOCalleeHelperAddress = DODOCalleeHelper.address;
|
DODOCalleeHelperAddress = DODOCalleeHelper.address;
|
||||||
@@ -136,6 +169,15 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
logger.log("Init DefaultMtFeeRateAddress Tx:", tx.tx);
|
logger.log("Init DefaultMtFeeRateAddress Tx:", tx.tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (FeeRateDIP3Address == "") {
|
||||||
|
await deployer.deploy(FeeRateDIP3);
|
||||||
|
FeeRateDIP3Address = FeeRateDIP3.address;
|
||||||
|
logger.log("FeeRateDIP3 Address: ", FeeRateDIP3Address);
|
||||||
|
const feeRateDIP3Instance = await FeeRateDIP3.at(FeeRateDIP3Address);
|
||||||
|
var tx = await feeRateDIP3Instance.initOwner(multiSigAddress);
|
||||||
|
logger.log("Init FeeRateDIP3 Tx:", tx.tx);
|
||||||
|
}
|
||||||
|
|
||||||
if (DefaultPermissionAddress == "") {
|
if (DefaultPermissionAddress == "") {
|
||||||
await deployer.deploy(PermissionManagerTemplate);
|
await deployer.deploy(PermissionManagerTemplate);
|
||||||
DefaultPermissionAddress = PermissionManagerTemplate.address;
|
DefaultPermissionAddress = PermissionManagerTemplate.address;
|
||||||
@@ -168,6 +210,7 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
DppAdminTemplateAddress = DppAdminTemplate.address;
|
DppAdminTemplateAddress = DppAdminTemplate.address;
|
||||||
logger.log("DppAdminTemplateAddress: ", DppAdminTemplateAddress);
|
logger.log("DppAdminTemplateAddress: ", DppAdminTemplateAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CpTemplateAddress == "") {
|
if (CpTemplateAddress == "") {
|
||||||
await deployer.deploy(CpTemplate);
|
await deployer.deploy(CpTemplate);
|
||||||
CpTemplateAddress = CpTemplate.address;
|
CpTemplateAddress = CpTemplate.address;
|
||||||
@@ -179,23 +222,26 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
ERC20TemplateAddress = ERC20Template.address;
|
ERC20TemplateAddress = ERC20Template.address;
|
||||||
logger.log("ERC20TemplateAddress: ", ERC20TemplateAddress);
|
logger.log("ERC20TemplateAddress: ", ERC20TemplateAddress);
|
||||||
}
|
}
|
||||||
if (MintableERC20TemplateAddress == "") {
|
|
||||||
await deployer.deploy(MintableERC20Template);
|
if (CustomERC20TemplateAddress == "") {
|
||||||
MintableERC20TemplateAddress = MintableERC20Template.address;
|
await deployer.deploy(CustomERC20Template);
|
||||||
logger.log("MintableERC20TemplateAddress: ", MintableERC20TemplateAddress);
|
CustomERC20TemplateAddress = CustomERC20Template.address;
|
||||||
|
logger.log("CustomERC20TemplateAddress: ", CustomERC20TemplateAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ERC20FactoryAddress == "") {
|
if (MineV2TemplateAddress == "") {
|
||||||
await deployer.deploy(
|
await deployer.deploy(ERC20MineV2);
|
||||||
ERC20Factory,
|
MineV2TemplateAddress = ERC20MineV2.address;
|
||||||
CloneFactoryAddress,
|
logger.log("MineV2TemplateAddress: ", MineV2TemplateAddress);
|
||||||
ERC20TemplateAddress,
|
|
||||||
MintableERC20TemplateAddress
|
|
||||||
);
|
|
||||||
ERC20FactoryAddress = ERC20Factory.address;
|
|
||||||
logger.log("ERC20FactoryAddress: ", ERC20FactoryAddress);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (MineV3TemplateAddress == "") {
|
||||||
|
await deployer.deploy(ERC20MineV3);
|
||||||
|
MineV3TemplateAddress = ERC20MineV3.address;
|
||||||
|
logger.log("MineV3TemplateAddress: ", MineV3TemplateAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Approve
|
//Approve
|
||||||
if (DODOApproveAddress == "") {
|
if (DODOApproveAddress == "") {
|
||||||
await deployer.deploy(DODOApprove);
|
await deployer.deploy(DODOApprove);
|
||||||
@@ -209,7 +255,22 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
logger.log("DODOApproveProxy Address: ", DODOApproveProxyAddress);
|
logger.log("DODOApproveProxy Address: ", DODOApproveProxyAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Factory
|
//Factory
|
||||||
|
if (ERC20V2FactoryAddress == "") {
|
||||||
|
await deployer.deploy(
|
||||||
|
ERC20V2Factory,
|
||||||
|
CloneFactoryAddress,
|
||||||
|
ERC20TemplateAddress,
|
||||||
|
CustomERC20TemplateAddress
|
||||||
|
);
|
||||||
|
ERC20V2FactoryAddress = ERC20V2Factory.address;
|
||||||
|
logger.log("ERC20V2FactoryAddress: ", ERC20V2FactoryAddress);
|
||||||
|
const ERC20V2FactoryInstance = await ERC20V2Factory.at(ERC20V2FactoryAddress);
|
||||||
|
var tx = await ERC20V2FactoryInstance.initOwner(multiSigAddress);
|
||||||
|
logger.log("Init ERC20V2Factory Tx:", tx.tx);
|
||||||
|
}
|
||||||
|
|
||||||
if (DvmFactoryAddress == "") {
|
if (DvmFactoryAddress == "") {
|
||||||
await deployer.deploy(
|
await deployer.deploy(
|
||||||
DvmFactory,
|
DvmFactory,
|
||||||
@@ -252,8 +313,8 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
DefaultMtFeeRateAddress,
|
DefaultMtFeeRateAddress,
|
||||||
DefaultPermissionAddress
|
DefaultPermissionAddress
|
||||||
);
|
);
|
||||||
logger.log("UpCrowdPoolingFactory address: ", UpCpFactory.address);
|
|
||||||
UpCpFactoryAddress = UpCpFactory.address;
|
UpCpFactoryAddress = UpCpFactory.address;
|
||||||
|
logger.log("UpCrowdPoolingFactory address: ", UpCpFactory.address);
|
||||||
const UpCpFactoryInstance = await UpCpFactory.at(UpCpFactory.address);
|
const UpCpFactoryInstance = await UpCpFactory.at(UpCpFactory.address);
|
||||||
var tx = await UpCpFactoryInstance.initOwner(multiSigAddress);
|
var tx = await UpCpFactoryInstance.initOwner(multiSigAddress);
|
||||||
logger.log("Init UpCpFactory Tx:", tx.tx);
|
logger.log("Init UpCpFactory Tx:", tx.tx);
|
||||||
@@ -291,56 +352,149 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
logger.log("Init DspFactory Tx:", tx.tx);
|
logger.log("Init DspFactory Tx:", tx.tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (DODOMineV2FactoryAddress == "") {
|
||||||
|
await deployer.deploy(
|
||||||
|
MineV2Factory,
|
||||||
|
CloneFactoryAddress,
|
||||||
|
MineV2TemplateAddress,
|
||||||
|
defaultMaintainer
|
||||||
|
);
|
||||||
|
DODOMineV2FactoryAddress = MineV2Factory.address;
|
||||||
|
logger.log("DODOMineV2FactoryAddress: ", DODOMineV2FactoryAddress);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DODOMineV3RegistryAddress == "") {
|
||||||
|
await deployer.deploy(MineV3Registry);
|
||||||
|
DODOMineV3RegistryAddress = MineV3Registry.address;
|
||||||
|
logger.log("DODOMineV3RegistryAddress: ", DODOMineV3RegistryAddress);
|
||||||
|
|
||||||
|
const dodoMineV3RegistryInstance = await MineV3Registry.at(DODOMineV3RegistryAddress);
|
||||||
|
var tx = await dodoMineV3RegistryInstance.initOwner(multiSigAddress);
|
||||||
|
logger.log("Init DODOMineV3Registry Tx:", tx.tx);
|
||||||
|
}
|
||||||
|
|
||||||
if (DODORouteV2HelperAddress == "") {
|
if (DODORouteV2HelperAddress == "") {
|
||||||
await deployer.deploy(DODOV2RouteHelper, DvmFactoryAddress, DppFactoryAddress, DspFactoryAddress);
|
await deployer.deploy(DODOV2RouteHelper, DvmFactoryAddress, DppFactoryAddress, DspFactoryAddress);
|
||||||
DODOV2RouteHelperAddress = DODOV2RouteHelper.address;
|
DODOV2RouteHelperAddress = DODOV2RouteHelper.address;
|
||||||
logger.log("DODOV2RouteHelper Address: ", DODOV2RouteHelperAddress);
|
logger.log("DODOV2RouteHelper Address: ", DODOV2RouteHelperAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Adapter
|
||||||
|
if (DODOV1AdpaterAddress == "") {
|
||||||
|
await deployer.deploy(DODOV1Adapter, DODOSellHelperAddress);
|
||||||
|
logger.log("DODOV1Adapter Address: ", DODOV1Adapter.address);
|
||||||
|
}
|
||||||
|
if (DODOV2AdapterAddress == "") {
|
||||||
|
await deployer.deploy(DODOV2Adapter)
|
||||||
|
logger.log("DODOV2Adapter Address: ", DODOV2Adapter.address);
|
||||||
|
}
|
||||||
|
if (UniAdapterAddress == "") {
|
||||||
|
await deployer.deploy(UniAdapter)
|
||||||
|
logger.log("UniAdapter Address: ", UniAdapter.address);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//Proxy
|
//Proxy
|
||||||
await deployer.deploy(
|
if (DODOV2ProxyAddress == "") {
|
||||||
DODODspProxy,
|
await deployer.deploy(
|
||||||
DspFactoryAddress,
|
DODOProxyV2,
|
||||||
WETHAddress,
|
DvmFactoryAddress,
|
||||||
DODOApproveProxyAddress
|
DppFactoryAddress,
|
||||||
);
|
WETHAddress,
|
||||||
logger.log("DODODspProxy Address: ", DODODspProxy.address);
|
DODOApproveProxyAddress,
|
||||||
|
DODOSellHelperAddress
|
||||||
|
);
|
||||||
|
await deployer.deploy(
|
||||||
|
DODOProxyV2
|
||||||
|
);
|
||||||
|
DODOV2ProxyAddress = DODOProxyV2.address;
|
||||||
|
logger.log("DODOV2Proxy02 Address: ", DODOProxyV2.address);
|
||||||
|
const DODOProxyV2Instance = await DODOProxyV2.at(DODOProxyV2.address);
|
||||||
|
var tx = await DODOProxyV2Instance.initOwner(multiSigAddress);
|
||||||
|
logger.log("Init DODOProxyV2 Tx:", tx.tx);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DODODspProxyAddress == "") {
|
||||||
|
await deployer.deploy(
|
||||||
|
DODODspProxy,
|
||||||
|
DspFactoryAddress,
|
||||||
|
WETHAddress,
|
||||||
|
DODOApproveProxyAddress
|
||||||
|
);
|
||||||
|
DODODspProxyAddress = DODODspProxy.address;
|
||||||
|
logger.log("DODODspProxy Address: ", DODODspProxy.address);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DODOCpProxyAddress == "") {
|
||||||
|
await deployer.deploy(
|
||||||
|
DODOCpProxy,
|
||||||
|
WETHAddress,
|
||||||
|
CpFactoryAddress,
|
||||||
|
UpCpFactoryAddress,
|
||||||
|
DODOApproveProxyAddress
|
||||||
|
);
|
||||||
|
DODOCpProxyAddress = DODOCpProxy.address;
|
||||||
|
logger.log("CpProxy address: ", DODOCpProxy.address);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DODOMineV3ProxyAddress == "") {
|
||||||
|
await deployer.deploy(
|
||||||
|
DODOMineV3Proxy,
|
||||||
|
CloneFactoryAddress,
|
||||||
|
MineV3TemplateAddress,
|
||||||
|
DODOApproveProxyAddress,
|
||||||
|
DODOMineV3RegistryAddress
|
||||||
|
);
|
||||||
|
DODOMineV3ProxyAddress = DODOMineV3Proxy.address;
|
||||||
|
logger.log("DODOMineV3ProxyAddress: ", DODOMineV3ProxyAddress);
|
||||||
|
|
||||||
|
const dodoMineV3ProxyInstance = await DODOMineV3Proxy.at(DODOMineV3ProxyAddress);
|
||||||
|
var tx = await dodoMineV3ProxyInstance.initOwner(multiSigAddress);
|
||||||
|
logger.log("Init DODOMineV3Proxy Tx:", tx.tx);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DODORouteProxyAddress == "") {
|
||||||
|
await deployer.deploy(
|
||||||
|
DODORouteProxy,
|
||||||
|
WETHAddress,
|
||||||
|
DODOApproveProxyAddress
|
||||||
|
);
|
||||||
|
DODOApproveProxyAddress = DODORouteProxy.address;
|
||||||
|
logger.log("DODORouteProxy Address: ", DODORouteProxy.address);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
await deployer.deploy(
|
if (network == 'kovan' || network == 'rinkeby') {
|
||||||
DODOCpProxy,
|
var tx;
|
||||||
WETHAddress,
|
//ApproveProxy init以及添加ProxyList
|
||||||
CpFactoryAddress,
|
|
||||||
UpCpFactoryAddress,
|
|
||||||
DODOApproveProxyAddress
|
|
||||||
);
|
|
||||||
logger.log("CpProxy address: ", DODOCpProxy.address);
|
|
||||||
|
|
||||||
|
|
||||||
await deployer.deploy(
|
|
||||||
DODOProxyV2,
|
|
||||||
DvmFactoryAddress,
|
|
||||||
DppFactoryAddress,
|
|
||||||
WETHAddress,
|
|
||||||
DODOApproveProxyAddress,
|
|
||||||
DODOSellHelperAddress
|
|
||||||
);
|
|
||||||
logger.log("DODOV2Proxy02 Address: ", DODOProxyV2.address);
|
|
||||||
const DODOProxyV2Instance = await DODOProxyV2.at(DODOProxyV2.address);
|
|
||||||
var tx = await DODOProxyV2Instance.initOwner(multiSigAddress);
|
|
||||||
logger.log("Init DODOProxyV2 Tx:", tx.tx);
|
|
||||||
|
|
||||||
|
|
||||||
if (network == 'kovan' || network == 'mbtestnet' || network == 'oktest' || network == 'matic' || network == 'arb' || network == 'rinkeby') {
|
|
||||||
|
|
||||||
const DODOApproveProxyInstance = await DODOApproveProxy.at(DODOApproveProxyAddress);
|
const DODOApproveProxyInstance = await DODOApproveProxy.at(DODOApproveProxyAddress);
|
||||||
var tx = await DODOApproveProxyInstance.init(multiSigAddress, [DODOProxyV2.address, DODOCpProxy.address, DODODspProxy.address]);
|
tx = await DODOApproveProxyInstance.init(multiSigAddress, [DODOV2ProxyAddress, DODODspProxyAddress, DODOCpProxyAddress, DODOMineV3ProxyAddress, DODORouteProxyAddress]);
|
||||||
logger.log("DODOApproveProxy Init tx: ", tx.tx);
|
logger.log("DODOApproveProxy Init tx: ", tx.tx);
|
||||||
|
|
||||||
|
//Approve init
|
||||||
const DODOApproveInstance = await DODOApprove.at(DODOApproveAddress);
|
const DODOApproveInstance = await DODOApprove.at(DODOApproveAddress);
|
||||||
var tx = await DODOApproveInstance.init(multiSigAddress, DODOApproveProxy.address);
|
tx = await DODOApproveInstance.init(multiSigAddress, DODOApproveProxy.address);
|
||||||
logger.log("DODOApprove Init tx: ", tx.tx);
|
logger.log("DODOApprove Init tx: ", tx.tx);
|
||||||
|
|
||||||
|
//Set FeeRateDIP3
|
||||||
|
const FeeRateModelInstance = await FeeRateModel.at(DefaultMtFeeRateAddress);
|
||||||
|
tx = await FeeRateModelInstance.setProxy(FeeRateDIP3Address);
|
||||||
|
logger.log("Set FeeRateDIP3 tx: ", tx.tx);
|
||||||
|
|
||||||
|
//ERC20V2Factory 设置fee
|
||||||
|
const ERC20V2FactoryInstance = await ERC20V2Factory.at(ERC20V2FactoryAddress);
|
||||||
|
tx = await ERC20V2FactoryInstance.changeCreateFee("100000000000000000");
|
||||||
|
logger.log("Set ERC20V2 fee tx: ", tx.tx);
|
||||||
|
|
||||||
|
//DODOMineV2Factory 设置个人账户为owner
|
||||||
|
const dodoMineV2FactoryInstance = await DODOMineV2Factory.at(DODOMineV2FactoryAddress);
|
||||||
|
var tx = await dodoMineV2FactoryInstance.initOwner(multiSigAddress);
|
||||||
|
logger.log("Init DODOMineV2Factory Tx:", tx.tx);
|
||||||
|
|
||||||
|
//DODOMineV3Registry add Proxy as admin
|
||||||
|
const dodoMineV3RegistryInstance = await DODOMineV3Registry.at(DODOMineV3RegistryAddress);
|
||||||
|
var tx = await dodoMineV3RegistryInstance.addAdminList(DODOMineV3ProxyAddress);
|
||||||
|
logger.log("DODOMineV3RegistryAddress Init tx: ", tx.tx);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ module.exports = async (deployer, network, accounts) => {
|
|||||||
logger.log("DodoNftErc721Address: ", DodoNftErc721Address);
|
logger.log("DodoNftErc721Address: ", DodoNftErc721Address);
|
||||||
const DodoNftErc721Instance = await DodoNftErc721.at(DodoNftErc721Address);
|
const DodoNftErc721Instance = await DodoNftErc721.at(DodoNftErc721Address);
|
||||||
var tx = await DodoNftErc721Instance.init(
|
var tx = await DodoNftErc721Instance.init(
|
||||||
multiSigAddress,
|
"0x16CC37d06FE5061CD0023fb8d142ABaAbB396A2b",
|
||||||
"DODONFT",
|
"DODONFT",
|
||||||
"DODONFT"
|
"DODONFT"
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ module.exports = {
|
|||||||
deploySwitch: {
|
deploySwitch: {
|
||||||
DEPLOY_V1: false,
|
DEPLOY_V1: false,
|
||||||
DEPLOY_V2: false,
|
DEPLOY_V2: false,
|
||||||
ADAPTER: false,
|
|
||||||
MOCK_TOKEN: false,
|
MOCK_TOKEN: false,
|
||||||
MOCK_V2_POOL: false,
|
MOCK_V2_POOL: false,
|
||||||
vDODOToken: false,
|
vDODOToken: false,
|
||||||
@@ -111,7 +110,7 @@ module.exports = {
|
|||||||
return new HDWalletProvider(privKey, "https://mainnet.infura.io/v3/" + infuraId);
|
return new HDWalletProvider(privKey, "https://mainnet.infura.io/v3/" + infuraId);
|
||||||
},
|
},
|
||||||
gas: 6000000,
|
gas: 6000000,
|
||||||
gasPrice: 25000000000,
|
gasPrice: 150000000000,
|
||||||
network_id: 1,
|
network_id: 1,
|
||||||
skipDryRun: true
|
skipDryRun: true
|
||||||
},
|
},
|
||||||
@@ -193,13 +192,20 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
arb: {
|
arb: {
|
||||||
|
networkCheckTimeout: 100000,
|
||||||
|
// provider: function () {
|
||||||
|
// return wrapProvider(
|
||||||
|
// new HDWalletProvider(privKey, "https://arb1.arbitrum.io/rpc")
|
||||||
|
// // new HDWalletProvider(privKey, 'https://arbitrum-mainnet.infura.io/v3/' + infuraId)
|
||||||
|
// )
|
||||||
|
// },
|
||||||
provider: function () {
|
provider: function () {
|
||||||
return wrapProvider(
|
return new HDWalletProvider(privKey, "https://arb1.arbitrum.io/rpc")
|
||||||
new HDWalletProvider(privKey, "https://arb1.arbitrum.io/rpc")
|
|
||||||
)
|
|
||||||
},
|
},
|
||||||
network_id: '42161',
|
network_id: '42161',
|
||||||
gasPrice: 400000000,
|
gas: 1200000,
|
||||||
|
gasPrice: 900000000,
|
||||||
|
skipDryRun: true
|
||||||
},
|
},
|
||||||
|
|
||||||
matic: {
|
matic: {
|
||||||
|
|||||||
Reference in New Issue
Block a user