From 999242a3168629d52715c8ab4589ebaf89be38ce Mon Sep 17 00:00:00 2001 From: tracy <25892474+traceurl@users.noreply.github.com> Date: Sat, 23 Apr 2022 21:50:07 +0800 Subject: [PATCH] deployed to optimism --- config/optimism-config.js | 101 ++++++++++++++++++++++++++++++++++++++ configAdapter.js | 4 ++ migrations/3_deploy_v2.js | 6 +-- truffle-config.js | 13 ++++- 4 files changed, 120 insertions(+), 4 deletions(-) create mode 100644 config/optimism-config.js diff --git a/config/optimism-config.js b/config/optimism-config.js new file mode 100644 index 0000000..1a55659 --- /dev/null +++ b/config/optimism-config.js @@ -0,0 +1,101 @@ +module.exports = { + OPTIMISM_CONFIG: { + //TOKEN + WETH: "0x4200000000000000000000000000000000000006", + CHI: "", + DODO: "", + + //Helper + DODOSellHelper: "0x56f8E27B27BFF96B5203c95977e8982f62bE70C2", + DODOCalleeHelper: "0x0BD7426f008737FeeD575ED8e2aA1bd4Fc49112D", + DODOV1PmmHelper: "0x6281E0628eb2B37fE9943279EA39725D5f0E0dBe", + DODOV2RouteHelper: "0xC48A8e689a644de96F80786ACb69E6F76D057F25", + ERC20Helper: "0x42E456ea0dd7538ea103fBb1d0388D14C97bB5b2", + DODOSwapCalcHelper: "0x2815b0aDdB0bECF86b10982a86A133Ae9d36AB0f", + MultiCall: "0xb98Ac2fEFc8b73aeAE33D02BB00c26E12afCa9Df", + CurveSample: "", + + //Template + CloneFactory: "0xB073F94b86149Eba149a7699100b0D6BF4e926DD", + FeeRateModel: "0xc005e0B11B7863d0DC4336B82D400C47C7383FbB", + FeeRateImpl: "0xBa1CC9399D26afcf6623EA932AC8C2BC6286866c", + FeeRateDIP3Impl: "", + UserQuota: "0xe9EfD15227294828B71712f0eA2f33Dab76F2C15", + PermissionManager: "0x9B5F869eA035acB897b894bB15Fb75103b249Ed0", + DVM: "0xa2347635ca3c7EcBD3770d47AAE94B433Cf36Cf5", + DPP: "0x232b8D14917Dcc658a8a4f27Bc5BfbA87adF411B", + DSP: "0x2Fc7BeAa2447a95befACFFa0869f8A9Dc3D34005", + DPPAdmin: "0x6fF3381364187Bd359bf517588464FF96609D205", + DPPAdvanced: "0x8CE14BD5794718f27293C879305Bd2f030641C54", + DPPAdvancedAdmin: "0xe5306C4DeACE10cD8F06e69883AcE826C44B4C29", + CP: "0x1361f756037D4c47B910eeC3983D6c4780280DbD", + ERC20MineV2: "0x056927aC73e764247D9D2C41B8C321eA82ee468A", + ERC20MineV3: "0x34229d00fB972e295359107c718eB621335Fa596", + ERC20: "0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01", + MintableERC20: "0xAF0F2c16C32158C8Ed395CE2eCbdF25F30a64346", + CustomERC20: "0xD8d9C37D0aCA6BF207b95912B1b50d40E1c710Bf", + + //Factory + DVMFactory: "0x2B800DC6270726F7E2266cE8cD5A3F8436fe0B40", + DPPFactory: "0xDb9C53F2cED34875685B607c97A61a65DA2F30a8", + DSPFactory: "0x1f83858cD6d0ae7a08aB1FD977C06DABEcE6d711", + UpCpFactory: "0x918424575a7070266e04d2EB5467AFe99B67C25c", + CrowdPoolingFactory: "0x424976B3997514aFa7c5122D053b8973f225D9db", + ERC20Factory: "", + ERC20V2Factory: "0xA3D6CE3c7884D74F364f37fb2bae744339E8d2E2", + ERC20V3Factory: "0x5a274F1DeADf90FC844C9Ff94f79F9c1fF0E0aCC", + DODOMineV2Factory: "0xA36b345d087C14161D0B3fE1b96fD1CC551CE0C9", + DODOMineV3Registry: "0x9eD110c929A1F9E4AE4Fa8a88f7Be5c2292d2a7F", + + //Approve + DODOApprove: "0xa492d6eABcdc3E204676f15B950bBdD448080364", + DODOApproveProxy: "0x8989A6909fe5af076AaA3D7b18BDe53153DbC348", + + //Periphery + DODOIncentive: "", + + //Adpater + DODOV1Adapter: "0xDd0951b69bc0CF9d39111E5037685FB573204c86", + DODOV2Adapter: "0x169ae3d5AcC90F0895790F6321eE81CB040E8A6B", + UniAdapter: "0x59Bef1EEdfCC26e7c9FD47c22625f81124228FaD", + CurveAdapter: "", + + //Proxy + DODOV2Proxy: "0xfD9D2827AD469B72B69329dAA325ba7AfbDb3C98", + DSPProxy: "0x61721e89a498dADa7aD579482BDC2aE60a9C5D54", + CpProxy: "0x072b3e5391B8bc868934562E510e6B2454163093", + DPPProxy: "", + RouteProxy: "0x7950dC01542eFE1c03aea610472e3b565B53f64a", + DODOMineV3Proxy: "0xaEdbD08D92ECccaA9A93b1A8D66D1d356e470c78", + + //vDODO + DODOCirculationHelper: "", + Governance: "", + dodoTeam: "", + vDODOToken: "", + + //Account + multiSigAddress: "0x677dD94031b3263Bd0E27ef5093C69A1a3037a00", + defaultMaintainer: "0x677dD94031b3263Bd0E27ef5093C69A1a3037a00", + + //================== 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/configAdapter.js b/configAdapter.js index 90a0dae..01f8bd5 100755 --- a/configAdapter.js +++ b/configAdapter.js @@ -10,6 +10,7 @@ const { AURORA_CONFIG } = require("./config/aurora-config"); const { MOONRIVER_CONFIG } = require("./config/moonriver-config"); const { BOBA_CONFIG } = require("./config/boba-config"); const { AVAX_CONFIG } = require("./config/avax-config"); +const { DASHBOARD_CONFIG } = require("./config/dashboard-config"); exports.GetConfig = function (network, accounts) { var CONFIG = {} @@ -44,6 +45,9 @@ exports.GetConfig = function (network, accounts) { case "avax": CONFIG = AVAX_CONFIG break; + case "dashboard": + CONFIG = DASHBOARD_CONFIG + break; //testnet case "kovan": CONFIG = KOVAN_CONFIG diff --git a/migrations/3_deploy_v2.js b/migrations/3_deploy_v2.js index bc9672a..3cb2661 100644 --- a/migrations/3_deploy_v2.js +++ b/migrations/3_deploy_v2.js @@ -76,8 +76,8 @@ module.exports = async (deployer, network, accounts) => { let DefaultPermissionAddress = CONFIG.PermissionManager; let DvmTemplateAddress = CONFIG.DVM; let DspTemplateAddress = CONFIG.DSP; - let DppTemplateAddress = CONFIG.DPP; - let DppAdminTemplateAddress = CONFIG.DPPAdmin; + let DppTemplateAddress = CONFIG.DPPAdvanced; + let DppAdminTemplateAddress = CONFIG.DPPAdvancedAdmin; let CpTemplateAddress = CONFIG.CP; let CpV2TemplateAddress = CONFIG.CPV2; let ERC20TemplateAddress = CONFIG.ERC20; @@ -464,7 +464,7 @@ module.exports = async (deployer, network, accounts) => { DODOCpProxy, WETHAddress, CpFactoryAddress, - UpCpFactoryAddress, + // UpCpFactoryAddress, V2 doesn't need this parameter DODOApproveProxyAddress ); DODOCpProxyAddress = DODOCpProxy.address; diff --git a/truffle-config.js b/truffle-config.js index 1a52d32..1a796ac 100755 --- a/truffle-config.js +++ b/truffle-config.js @@ -66,7 +66,11 @@ module.exports = { MineV3: false, NFT_POOL: false, UserQuota: false, - STARTER: true + STARTER: false, + }, + + dashboard: { + port: 24012, }, networks: { @@ -228,6 +232,13 @@ module.exports = { skipDryRun: true }, + optimism: { + provider: () => { + return new HDWalletProvider(privKey, 'https://mainnet.optimism.io') + }, + network_id: "10" + }, + coverage: { host: "127.0.0.1", port: 6545,