From a1453561ae7d61db765b8ea1d200704276491c79 Mon Sep 17 00:00:00 2001 From: tracy <25892474+traceurl@users.noreply.github.com> Date: Mon, 23 May 2022 21:23:54 +0800 Subject: [PATCH] update optimism deployment info --- config/dashboard-config.js | 101 +++++++++++++++++++++++++++++++++++++ config/optimism-config.js | 8 +-- migrations/3_deploy_v2.js | 65 +++++++++++++++++------- 3 files changed, 152 insertions(+), 22 deletions(-) create mode 100644 config/dashboard-config.js diff --git a/config/dashboard-config.js b/config/dashboard-config.js new file mode 100644 index 0000000..20a2868 --- /dev/null +++ b/config/dashboard-config.js @@ -0,0 +1,101 @@ +module.exports = { + DASHBOARD_CONFIG: { + //TOKEN + WETH: "0x5C7F8A570d578ED84E63fdFA7b1eE72dEae1AE23", + CHI: "", + DODO: "", + + //Helper + DODOSellHelper: "0x2555e89B97aD237d9C4bE4947A3035E55c772209", + DODOCalleeHelper: "0x858960874686E8dE9F372482d2C6689a64BCd165", + DODOV1PmmHelper: "0x5C561e45C17ccc5134FC2e91a6f9B1F983d3A49b", + DODOV2RouteHelper: "0xeb69b4dd6a5A1aD3518Ce614447F4FAfFE8D7673", + ERC20Helper: "0xbd2F5c60cf7d60daD2106ceD4D21b90722761f14", + DODOSwapCalcHelper: "0xEe9F51A51141b54E9bDdC9E7295202dfd66BaBe2", + MultiCall: "0x4f4408D78F9E9e242c17C635FbD0f1952951c917", + CurveSample: "", + + //Template + CloneFactory: "0x7fb3eF78906Dc7b4dA2389e8aE7Adc4E1fd73A96", + FeeRateModel: "0xA1318f82d09fFDAB1d36C23Ee0634E6Fd651dF39", + FeeRateImpl: "0xe0Ca2d1e99D30F3C668dD3a21E72AA2Cfa2e23A9", + FeeRateDIP3Impl: "0x1498c2B758Ba42EE9ca482A4625B2f6eaD060f8D", + UserQuota: "0x03bE4662C6A01BE1c2A2Afc68696492552b7ceBe", + PermissionManager: "0xf05063C6201CFfB122B69b43f7d19D362040b6FA", + DVM: "0x926f03a6950eB30b32Bc5085b5De8739DE7D3957", + DPP: "0x0B205D693EfD607dd80FdaCa88d474985194a65d", + DSP: "0x9AB262581a36d6d5F313CEF7FeC3950583B28255", + DPPAdmin: "0xf2B52D54c38cfdE71Cf17e5Cd19B7123630a7AD8", + DPPAdvanced: "0xd4f043639E437cbe527254c3e3b592234855dD56", + DPPAdvancedAdmin: "0x30a444F3A06b37d3f013F6f0f2B7D53f3D864c6f", + CP: "0xac1Cad67071A63276fD9664F548895936f0E8b80", + ERC20MineV2: "0x56477fDbeBdA30b7a2570aa80d738612e0818DeC", + ERC20MineV3: "0x69BB7488A0055DDE534F9E70ABce4f91d31f1178", + ERC20: "0x922Ace125f9fd72abE77290f46Baf103C2D50323", + CustomERC20: "0xE6dd5089cfDEB80490F52fC2Edb4EE3B6819Ae15", + CustomMintableERC20: "0x3acAFFCb7ac229D85Fd8956E223fAa10F42aBB89", + + //Factory + DVMFactory: "0x3D5ACF003Dc729f0cdF8263733C1329A59967458", + DPPFactory: "0x41cc4b7F7c915183149834e7d56FdB57dc096980", + DSPFactory: "0xc4403dCe7619943eD9007B9cb64Ef98f683681D3", + UpCpFactory: "0xaDFF7B1A6B46Ab0bD06BBEaBf0267CD71d5cFD69", + CrowdPoolingFactory: "0x8710Dbb9bad2Be7464c3dcfCEF7B688749233Bb3", + ERC20Factory: "", + ERC20V2Factory: "0x508b5231CbD02Cafd12100f485ae104dB8198736", + ERC20V3Factory: "0x25731ECeA018f4fEa48EF50e4bb3Ed0cf4fa98d1", + DODOMineV2Factory: "0x531C2BCA26Db68A78530CD7c2a0db2daa95e0e9C", + DODOMineV3Registry: "0xCF023387C8046c2F9db9C8272d76EfB799fB9572", + + //Approve + DODOApprove: "0x9B736bB8f336f61E16454DCA4dE130703D151042", + DODOApproveProxy: "0x0D025aC3c634AdF79E9Fd1cAeC5bD6e22262EbC4", + + //Periphery + DODOIncentive: "", + + //Adpater + DODOV1Adapter: "0xe5F68F202627571ac77E828338b64E9Fd7954C62", + DODOV2Adapter: "0xeE040ca26BD09cf3110b6291B8D920010544280C", + UniAdapter: "0x4ba671a862a507265809ab8536b5Ec43b953C183", + CurveAdapter: "", + + //Proxy + DODOV2Proxy: "0xDdb86fF3984b213BFC951E16B829aBb64A3c20c0", + DSPProxy: "0x0341c0bcac18997c51cddDbd86b31960d46B4465", + CpProxy: "0xA2430D4C37f9E34A459DA0ac06C57183314B234A", + DPPProxy: "0xD01431F4749d973977c8007C05C680F598eBa3E2", + RouteProxy: "0x721deBc2cA1FF57A2E9C7dE2A397a34117239998", + DODOMineV3Proxy: "0xcc11D79fd8983BCfd0B1C2928290963E122f58C8", + + //vDODO + DODOCirculationHelper: "", + Governance: "", + dodoTeam: "", + vDODOToken: "", + + //Account + multiSigAddress: "0xe84fd5bDb236691A1ab5CB0eE25Df5abdFaB66C9", + defaultMaintainer: "0xe84fd5bDb236691A1ab5CB0eE25Df5abdFaB66C9", + + //================== NFT ==================== + BuyoutModel: "", + Fragment: "", + NFTCollateralVault: "", + DODONFTRouteHelper: "", + + DodoNftErc721: "", + DodoNftErc1155: "", + + DODONFTRegistry: "", + DODONFTProxy: "", + + //=================== NFTPool ================== + DODONFTApprove: "", + DODONFTPoolProxy: "", + FilterAdmin: "", + FilterERC721V1: "", + FilterERC1155V1: "", + NFTPoolController: "" + } +} \ No newline at end of file diff --git a/config/optimism-config.js b/config/optimism-config.js index 1a55659..192b0d9 100644 --- a/config/optimism-config.js +++ b/config/optimism-config.js @@ -22,13 +22,13 @@ module.exports = { FeeRateDIP3Impl: "", UserQuota: "0xe9EfD15227294828B71712f0eA2f33Dab76F2C15", PermissionManager: "0x9B5F869eA035acB897b894bB15Fb75103b249Ed0", - DVM: "0xa2347635ca3c7EcBD3770d47AAE94B433Cf36Cf5", + DVM: "0x5fa976832DdC8feD313AD8197BEe26B7df330512", DPP: "0x232b8D14917Dcc658a8a4f27Bc5BfbA87adF411B", - DSP: "0x2Fc7BeAa2447a95befACFFa0869f8A9Dc3D34005", + DSP: "0xD300E73fc57ff85744A91454933383f83c60C5B3", DPPAdmin: "0x6fF3381364187Bd359bf517588464FF96609D205", - DPPAdvanced: "0x8CE14BD5794718f27293C879305Bd2f030641C54", + DPPAdvanced: "0x5f7944dCC429CC0DC7DEEcfB4C6ac7632998e7C6", DPPAdvancedAdmin: "0xe5306C4DeACE10cD8F06e69883AcE826C44B4C29", - CP: "0x1361f756037D4c47B910eeC3983D6c4780280DbD", + CP: "0x16225219b24E7B82dc60AA7ccd7d63F712D392bB", ERC20MineV2: "0x056927aC73e764247D9D2C41B8C321eA82ee468A", ERC20MineV3: "0x34229d00fB972e295359107c718eB621335Fa596", ERC20: "0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01", diff --git a/migrations/3_deploy_v2.js b/migrations/3_deploy_v2.js index 3cb2661..561825c 100644 --- a/migrations/3_deploy_v2.js +++ b/migrations/3_deploy_v2.js @@ -22,13 +22,17 @@ const DvmTemplate = artifacts.require("DVM"); const DspTemplate = artifacts.require("DSP"); const DppTemplate = artifacts.require("DPP"); const DppAdminTemplate = artifacts.require("DPPAdmin"); +const DppAdvancedTemplate = artifacts.require("DPPAdvanced"); +const DppAdvancedAdminTemplate = artifacts.require("DPPAdvancedAdmin"); const CpTemplate = artifacts.require("CP"); const ERC20Template = artifacts.require("InitializableERC20"); const CustomERC20Template = artifacts.require("CustomERC20"); +const CustomMintableERC20Template = artifacts.require("CustomMintableERC20"); const ERC20MineV2 = artifacts.require("ERC20Mine"); const ERC20MineV3 = artifacts.require("ERC20MineV3"); const ERC20V2Factory = artifacts.require("ERC20V2Factory"); +const ERC20V3Factory = artifacts.require("ERC20V3Factory"); const DvmFactory = artifacts.require("DVMFactory"); const DppFactory = artifacts.require("DPPFactory"); const DspFactory = artifacts.require("DSPFactory"); @@ -72,16 +76,19 @@ module.exports = async (deployer, network, accounts) => { let DefaultMtFeeRateAddress = CONFIG.FeeRateModel; let UserQuotaAddress = CONFIG.UserQuota; let FeeRateImplAddress = CONFIG.FeeRateImpl; - let FeeRateDIP3ImplAddress = CONFIG.FeeRateDIP3; + let FeeRateDIP3ImplAddress = CONFIG.FeeRateDIP3Impl; let DefaultPermissionAddress = CONFIG.PermissionManager; let DvmTemplateAddress = CONFIG.DVM; let DspTemplateAddress = CONFIG.DSP; - let DppTemplateAddress = CONFIG.DPPAdvanced; - let DppAdminTemplateAddress = CONFIG.DPPAdvancedAdmin; + let DppTemplateAddress = CONFIG.DPP; + let DppAdminTemplateAddress = CONFIG.DPPAdmin; + let DppAdvancedTemplateAddress = CONFIG.DPPAdvanced; + let DppAdvancedAdminTemplateAddress = CONFIG.DPPAdvancedAdmin; let CpTemplateAddress = CONFIG.CP; let CpV2TemplateAddress = CONFIG.CPV2; let ERC20TemplateAddress = CONFIG.ERC20; let CustomERC20TemplateAddress = CONFIG.CustomERC20; + let CustomMintableERC20TemplateAddress = CONFIG.CustomMintableERC20; let MineV2TemplateAddress = CONFIG.ERC20MineV2; let MineV3TemplateAddress = CONFIG.ERC20MineV3; @@ -93,6 +100,7 @@ module.exports = async (deployer, network, accounts) => { let CpV2FactoryAddress = CONFIG.CrowdPoolingFactoryV2; let UpCpFactoryAddress = CONFIG.UpCpFactory; let ERC20V2FactoryAddress = CONFIG.ERC20V2Factory; + let ERC20V3FactoryAddress = CONFIG.ERC20V3Factory; let DODOMineV3RegistryAddress = CONFIG.DODOMineV3Registry; let DODOMineV2FactoryAddress = CONFIG.DODOMineV2Factory; @@ -109,7 +117,6 @@ module.exports = async (deployer, network, accounts) => { let DODOV2ProxyAddress = CONFIG.DODOV2Proxy; let DODODspProxyAddress = CONFIG.DSPProxy; let DODOCpProxyAddress = CONFIG.CpProxy; - let DODOCpV2ProxyAddress = CONFIG.CpProxyV2; let DODODppProxyAddress = CONFIG.DPPProxy; let DODOMineV3ProxyAddress = CONFIG.DODOMineV3Proxy; let DODORouteProxyAddress = CONFIG.RouteProxy; @@ -232,6 +239,18 @@ module.exports = async (deployer, network, accounts) => { logger.log("DppAdminTemplateAddress: ", DppAdminTemplateAddress); } + if (DppAdvancedTemplateAddress == "") { + await deployer.deploy(DppAdvanedTemplate); + DppAdvancedTemplateAddress = DppAdvancedTemplate.address; + logger.log("DppAdvancedTemplateAddress: ", DppAdvancedTemplateAddress); + } + + if (DppAdvancedAdminTemplateAddress == "") { + await deployer.deploy(DppAdvancedAdminTemplate); + DppAdvancedAdminTemplateAddress = DppAdvancedAdminTemplate.address; + logger.log("DppAdvancedAdminTemplateAddress: ", DppAdvancedAdminTemplateAddress); + } + if (CpTemplateAddress == "") { await deployer.deploy(CpTemplate); CpTemplateAddress = CpTemplate.address; @@ -250,6 +269,12 @@ module.exports = async (deployer, network, accounts) => { logger.log("CustomERC20TemplateAddress: ", CustomERC20TemplateAddress); } + if (CustomMintableERC20TemplateAddress == "") { + await deployer.deploy(CustomMintableERC20Template); + CustomMintableERC20TemplateAddress = CustomMintableERC20Template.address; + logger.log("CustomMintableERC20TemplateAddress: ", CustomMintableERC20TemplateAddress); + } + if (MineV2TemplateAddress == "") { await deployer.deploy(ERC20MineV2); MineV2TemplateAddress = ERC20MineV2.address; @@ -292,6 +317,22 @@ module.exports = async (deployer, network, accounts) => { logger.log("Init ERC20V2Factory Tx:", tx.tx); } + if (ERC20V3FactoryAddress == "") { + await deployer.deploy( + ERC20V3Factory, + CloneFactoryAddress, + ERC20TemplateAddress, + CustomERC20TemplateAddress, + CustomMintableERC20TemplateAddress, + 2000000000000000 + ); + ERC20V3FactoryAddress = ERC20V3Factory.address; + logger.log("ERC20V3FactoryAddress: ", ERC20V3FactoryAddress); + const ERC20V3FactoryInstance = await ERC20V3Factory.at(ERC20V3FactoryAddress); + var tx = await ERC20V3FactoryInstance.initOwner(multiSigAddress); + logger.log("Init ERC20V2Factory Tx:", tx.tx); + } + if (DvmFactoryAddress == "") { await deployer.deploy( DvmFactory, @@ -311,8 +352,8 @@ module.exports = async (deployer, network, accounts) => { await deployer.deploy( DppFactory, CloneFactoryAddress, - DppTemplateAddress, - DppAdminTemplateAddress, + DppAdvancedTemplateAddress, + DppAdvancedAdminTemplateAddress, defaultMaintainer, DefaultMtFeeRateAddress, DODOApproveProxyAddress @@ -471,18 +512,6 @@ module.exports = async (deployer, network, accounts) => { logger.log("CpProxy address: ", DODOCpProxy.address); } - if (DODOCpV2ProxyAddress == "") { - await deployer.deploy( - DODOCpProxy, - WETHAddress, - CpV2FactoryAddress, - UpCpFactoryAddress, - DODOApproveProxyAddress - ); - DODOCpV2ProxyAddress = DODOCpProxy.address; - logger.log("CpV2Proxy address: ", DODOCpProxy.address); - } - if (DODODppProxyAddress == "") { await deployer.deploy( DODODppProxy,