diff --git a/config/base-goerli-config.js b/config/base-goerli-config.js new file mode 100644 index 0000000..154d3c0 --- /dev/null +++ b/config/base-goerli-config.js @@ -0,0 +1,101 @@ +module.exports = { + BASE_GOERLI_CONFIG: { + //TOKEN + WETH: "0x4200000000000000000000000000000000000006", + CHI: "", + DODO: "", + + //Helper + DODOSellHelper: "0x193d1EBBaa3f84F9266030C2B2B2b24632d15D24", + DODOCalleeHelper: "0x24077ac88473B06578A1C58171648861006B85dE", + DODOV1PmmHelper: "0xebB06e8873612547e6630ded8Afa1bBAD5c0561E", + DODOV2RouteHelper: "0xe315f83b8124c5BfA6837899035B5dD004197981", + ERC20Helper: "0xa3d53e4f816810c00cA6a3Bc44504B84814628A9", + DODOSwapCalcHelper: "0xf78bFEF2D57fb82e9d6669Fb0f62Ea542d566211", + MultiCall: "0x7139BC95D1fA30895eC78C308c1Da671e6527A9b", + CurveSample: "", + + //Template + CloneFactory: "0x33354BCa7ed4ADbFB3135955DC6555c3e6E610B4", + FeeRateModel: "0x13F4f108B4905dcC1facd102BE03a24d707b590f", + FeeRateImpl: "", + FeeRateDIP3Impl: "0xB4c6f461608205CA12E5b31E453956023B0e66DD", + UserQuota: "0x6bcAc16cC11A9b90203909e50a9bBb4a818fcd0A", + PermissionManager: "0x1e9270357b85AF9DD933244D4F3C05C2067980b2", + DVM: "0xcDCfBD90C4848951cf157C25edcA8D0eD17eEc33", + DPP: "0x40B8B0F8435294EB2A599e8a8FBeCB38628F06F4", + DSP: "0xE1ef2d33708dc0679f7686193CB86897FC137f7a", + DPPAdmin: "0xda3ED08a2E124637C24308898BE2CA28516C0f3c", + DPPAdvanced: "0x21798A2eF0e081C125f115871F6b95FaCC40014b", //todo ERROR + DPPAdvancedAdmin: "0xb3ED2A724f1EE0AE13f9a306484Fb3A1d359C0Df", + // CP: "0xc37cfd4DdFA000D3Fc2D5fadF4D63B70530192D1", //TODO NO Need + ERC20MineV2: "0xb832B4aDcC65b954e95108BB04BB496415cebA3a", + ERC20MineV3: "0x306a559D7b7ac117efFa7e4d62E5cE05264f1e79", + ERC20: "0x5e0297F3A3627816BD4e5454Af0b57F960be224c", + CustomERC20: "0xc8B7116f1f3369BA004437D8d975c904f862a035", + CustomMintableERC20: "0x8ab09236e8B7a45eA119F3F808C63d157B2f64CF", + + //Factory + DVMFactory: "0x888C189EC28dce10c60A404A21f22662Ba8134dd", + DPPFactory: "0x2851406143e4158Dabc82Bda6498E12C81B93525", + DSPFactory: "0xD842D8A0Fc25A87F5bB43F9123B70D481b185A47", + UpCpFactory: "", + // CrowdPoolingFactory: "0x7B22dDD46fBc8b5518EcF2f5Cfe381cd6c130AdB", //TODO NO Need + ERC20Factory: "", + ERC20V2Factory: "0x4E4f8d8742822AF3B0E61cF6B2725Ff64515ce84", + ERC20V3Factory: "0xcC1ddBe8654bb807106550903e5B910AA8782578", //todo ERROR + DODOMineV2Factory: "0x45e5ad761f929d9097DEdd191278B360b6Ab9ca9", + DODOMineV3Registry: "0xFF57A5CBf6279d68A301d46E72347772bfC844FD", + + //Approve + DODOApprove: "0xF2171268dD2581C55DEeb4Ed3489b726E79Ef0F5", + DODOApproveProxy: "0xF68D5B437638990B82BF8B7a4B9204eC87Eb0760", + + //Periphery + DODOIncentive: "", + + //Adpater + DODOV1Adapter: "0xbB1eB7E5C1d8c645734DbBeBC904da56d1A8E014", + DODOV2Adapter: "0x8D329f2E4AE130216D5Da19779D6199907aDeF2F", + UniAdapter: "0xC6402c27F4cFc5d5C4674d0412ab15a0779226B1", + CurveAdapter: "", + + //Proxy + DODOV2Proxy: "0x0EDf30fffa1D584F1077CFdaE9c499c3E45501c1", + DSPProxy: "0x14558924B756b6eeC200e2201732a5b150f9b534", + CpProxy: "0xEA654e8501a9208716300D62060b20908D2236C4", + DPPProxy: "0xfE49e5F0AEf3639dA48c1dC297C84C2a68c81B8A", + RouteProxy: "0x8f3430AC47639B5ae2454c7d3bE2a4272eF7ADfd", + DODOMineV3Proxy: "0xe0096b3Dc84f4cca520638F7F4be84A560798C3f", + + //vDODO + DODOCirculationHelper: "", + Governance: "", + dodoTeam: "", + vDODOToken: "", + + //Account + multiSigAddress: "0xFA3f686392288a7055E1d9319d042eDa4B8C41F9", + defaultMaintainer: "0xFA3f686392288a7055E1d9319d042eDa4B8C41F9", + + //================== 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/goerli-config.js b/config/goerli-config.js new file mode 100644 index 0000000..2699227 --- /dev/null +++ b/config/goerli-config.js @@ -0,0 +1,138 @@ +module.exports = { + GOERLI_CONFIG: { + //TOKEN + WETH: "0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6", + CHI: "", + DODO: "", + + //Helper + ERC20Helper: "0x24549FC74B3076A962624A26370ed556c467F74C", + DODOSellHelper: "0x87cC76c08eF625d46eeC9183bA2977B34E16CDfe", + DODOCalleeHelper: "0x5B2fd46E6E3Ff1E479d651ec0b210882Aa9871dF", + DODOV1PmmHelper: "0xAC716E87b0853C0712674e8E3a8435a489F276b4", + DODOV2RouteHelper: "0x7E9c460d0A10bd0605B15F0d0388e307d34a62E6", + + //Template + CloneFactory: "0x64842A3EbC09bB69429c1a34ae181375fea5f17F", + FeeRateModel: "0x41bb458c5FEEB114a977E59D5E153A2112e4e293", + FeeRateDIP3: "", + FeeRateDIP3Impl: "0x93D9a95bC11123B882BD5FCC3c86e3A18af1da85", + UserQuota: "", + FeeRateImpl:"", + PermissionManager: "0x5381382257C761DAc6F1509B1BA1B70dDaa6862a", + DVM: "0x6D208e3dD3ba8dc7b0D23D6Bf15fef9324643984", + DPPAdvanced: "0xc6D718Fa2bb39CCDf29a640361E42656DB1EBBD9", + DPPAdvancedAdmin: "0x1C6578Db75A269c9dD7baAAD3B252b74EA03E741", + DSP: "0xab5819Ac14dc28008E63bA0B8159495C06aCDe9e", + DPPAdmin: "", + CP: "", + CPV2: "0x2144BF2003bFd9Aa0950716333fBb5B7A1Caeda4", + ERC20MineV2: "0x6463A1b6f84e4e58d5fb2A6B88013Cb398CAC986", + ERC20MineV3: "0xd9783F23d0636C303E0630026217dA2f8294e673", + ERC20: "0x7E49058F16b8754b0af9B03A39777b1Ca5285f67", + CustomERC20: "0x942a23d3Be9C83D267B1B862F2ea397906Af8f3a", + CustomMintableERC20: "0x716fcc67dcA500A91B4a28c9255262c398D8f971", + + + //Factory + DVMFactory: "0x7449Cd63C2b1A06C36945eD83f0626D303781B6E", + DPPFactory: "0x67555eE83e92DbDae8FF5782A1E9373faE1E818B", + DSPFactory: "0x9244EAa27266128610bad748625f512275A41a96", + CrowdPoolingFactory: "", + CPV2Factory: "0x1F076a800005c758a505E759720eb6737136e893", + UpCpFactory: "", + ERC20Factory: "", + ERC20V2Factory: "", + DODOMineV3Registry: "0x4632e6EBd4a01eBF54739A9D71a62CEdb29E9183", + ERC20V3Factory: "0xde1eCf0f7C8141FfC2149405947206f76951816e", + + //Approve + DODOApprove: "0xC9143e54021f4a6d33b9b89DBB9F458AaEdd56FB", + DODOApproveProxy: "0xA9148dC69f71b8f3dF71193a48f2915980dB8C19", + + //Periphery + DODOIncentive: "", + + //Adpater + DODOV1Adapter: "0x49d5c0908d12B272b0b5A3443a54FEd6e4a044FB", + DODOV2Adapter: "0xAE1E7e4c5743321d2a8ceeD179264998a56CF1d9", + UniAdapter: "0xD63c8Bf9ACaFfE6da2a4043F1C94CC3a55F28117", + + //Proxy + DODOV2Proxy: "0xbce44767af0a53A108b3B7ba4F740E03D228Ec0A", + DSPProxy: "0x8d9ccc26CbF3D49bbA76E9920C3E6ed29e06b5cc", + CpProxy: "", + CpProxyV2: "0x7Dd8c909E1F48a68FfEF03492761AF17B1496EDc", + DPPProxy: "0xc4A1a152812dE96b2B1861E433f42290CDD7f113", + RouteProxy: "0xd8B23fa37b1708af44C6BAEA9B5605091Fb5466e", + DODOMineV3Proxy: "0x99d69565EdA438E3ebAA0627A407968ABD0f755b", + + //vDODO + DODOCirculationHelper: "", + Governance: "", + dodoTeam: "", + vDODOToken: "", + + //Account + multiSigAddress: "0x1Dc662D3D7De14a57CD369e3a9E774f8F80d4214", + defaultMaintainer: "0x1Dc662D3D7De14a57CD369e3a9E774f8F80d4214", + + //FeeRateImpl: "0xCc5e58B59158A9dfb13e4d902958689fA0e7dE9c", + multiCall: "0x696E25A5e2AEd1C55E6d6Cfa0532Bbda9020165d", + //DODO: "0xF65899222FC7C73044Fe24f954b3b29Ff092B9e2", + //DODOZoo: "0x168442Fec1e1E782c8770185dBb8328B91dC45c0", + DODOSwapCalcHelper: "0x6433407a29706Bbdd43b36cd402a53A174f066a1", + DODOMineV2Factory: "0xc7d7CC1e9f5E823887980c9C51F9c418ee3A3e28", + DODOGaslessTrading: "0x628E5081bA93b1c4F58E54e7175088B1ACe58852", + DODOLimitOrder: "0x65934e2f228Fde069A6255F46E6A15Bc9DE38545", + DODOLimitOrderBot: "0x4aAe1d041C01078725dB016BA4D4F72455CaF931", + + //================== NFT ==================== + BuyoutModel: "", + Fragment: "", + NFTCollateralVault: "", + DODONFTRouteHelper: "", + + InitializableERC721: "", + InitializableERC1155: "", + NFTTokenFactory: "", + + DodoNftErc721: "", + DodoNftErc1155: "", + + DODONFTRegistry: "", + DODONFTProxy: "", + + //================= DropsV1 ================= + MysteryBoxV1: "", + RandomGenerator: "", + RandomPool: [], + + //================= DropsV2 ================== + DropsFeeModel: "", + DropsProxy: "", + + //DODODropsV2: "0x4A2b9f63AE41cF3003A494F2d8Fcd9Ed850b9A6f" + // DropsERC721: "0x3df8d553275781C777f432A74EEE9099226B9d13", + // DropsERC1155: "0x3a8EcF30428bd4e33Cd7011533DFd596F7705c8F", + + //=================== NFTPool ================== + DODONFTApprove: "", + FilterAdmin: "", + FilterERC721V1: "", + FilterERC1155V1: "", + DODONFTPoolProxy: "", + NFTPoolController: "", + + + //=================== Starter =================== + DODOStarterProxy: "0x04f7BaE2A4c05cd567F762E33450deBCebdC89EA", + DODOStarterFactoryV2: "0x17644d3B366273faC75A07996E2F90A99A2946a7", + FairFundingV2: "0x297da061D1dE0132D241Fafed224288B34d81005", // + InstantFundingv2: "0x89872650fA1A391f58B4E144222bB02e44db7e3B", // + + UserQuota: "", + UserQuotaFactory: "" + + } +} \ No newline at end of file diff --git a/configAdapter.js b/configAdapter.js index 01f8bd5..a4e5bbe 100755 --- a/configAdapter.js +++ b/configAdapter.js @@ -11,6 +11,7 @@ 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"); +const { BASE_GOERLI_CONFIG } = require("./config/base-goerli-config"); exports.GetConfig = function (network, accounts) { var CONFIG = {} @@ -59,6 +60,9 @@ exports.GetConfig = function (network, accounts) { CONFIG.multiSigAddress = accounts[0] CONFIG.defaultMaintainer = accounts[0] break; + case "baseGoerli": + CONFIG = BASE_GOERLI_CONFIG + break; } return CONFIG } diff --git a/migrations/3_deploy_v2.js b/migrations/3_deploy_v2.js index 561825c..24e5a1c 100644 --- a/migrations/3_deploy_v2.js +++ b/migrations/3_deploy_v2.js @@ -550,7 +550,7 @@ module.exports = async (deployer, network, accounts) => { } - if (network == 'kovan' || network == 'rinkeby' ||network == "boba_test") { + if (network == 'kovan' || network == 'rinkeby' ||network == "boba_test" || network == "baseGoerli") { var tx; //ApproveProxy init以及添加ProxyList const DODOApproveProxyInstance = await DODOApproveProxy.at(DODOApproveProxyAddress); diff --git a/truffle-config.js b/truffle-config.js index 1a796ac..7a94ad3 100755 --- a/truffle-config.js +++ b/truffle-config.js @@ -39,7 +39,7 @@ module.exports = { */ deploySwitch: { DEPLOY_V1: false, - DEPLOY_V2: false, + DEPLOY_V2: true, ERC20V3Factory: false, MOCK_TOKEN: false, MOCK_V2_POOL: false, @@ -74,7 +74,7 @@ module.exports = { }, networks: { - // Useful for testing. The `development` name is special - truffle uses it by default + // Useful for testing. The `development` name is special - truffle uses it by default truffle dashboard // if it's defined here and no other network is specified at the command line. // You should run a client (like ganache-cli, geth or parity) in a separate terminal // tab if you use this network and you must also set the `host`, `port` and `network_id` @@ -88,6 +88,19 @@ module.exports = { gasPrice: 1, }, + baseGoerli: { + networkCheckTimeout: 100000, + provider: function () { + return new HDWalletProvider(privKey, "https://goerli.base.org"); + }, + networkCheckTimeout:100000, + network_id: 84531, + confirmations: 10, + timeoutBlocks: 200, + gasPrice: 3000000000, + skipDryRun: true + }, + kovan: { networkCheckTimeout: 100000, provider: function () {