add dppProxy

This commit is contained in:
owen05
2021-10-11 23:42:56 +08:00
parent 18f6debb19
commit 3020279d17
14 changed files with 42 additions and 185 deletions

View File

@@ -13,7 +13,7 @@ module.exports = {
DODOSellHelper: "0xA5F36E822540eFD11FcD77ec46626b916B217c3e",
DODOCalleeHelper: "0xe3B40F8D8346d428EAB28d9Fd672b784d921cfBD",
DODOV1PmmHelper: "0x4EE6398898F7FC3e648b3f6bA458310ac29cD352",
DODOV2RouteHelper: "0xBE24a05a317ED701630EE503F0C59A01e4B0c88C",
DODOV2RouteHelper: "0x7737fd30535c69545deeEa54AB8Dd590ccaEBD3c",//0xBE24a05a317ED701630EE503F0C59A01e4B0c88C
ERC20Helper: "0x7C062B9C584fA6eC2504270790D38240A2c5fE72",
DODOSwapCalcHelper: "0xd7863Aee0B7A312F2c055B441253d66AFac8d144",
MultiCall: "0xF718F2bd590E5621e53f7b89398e52f7Acced8ca",
@@ -37,7 +37,7 @@ module.exports = {
//Factory
DVMFactory: "0xDa4c4411c55B0785e501332354A036c04833B72b",
DPPFactory: "0xDdB13e6dd168E1a68DC2285Cb212078ae10394A9",
DPPFactory: "0xa6Cf3d163358aF376ec5e8B7Cc5e102a05FdE63D",//0xDdB13e6dd168E1a68DC2285Cb212078ae10394A9
DSPFactory: "0xC8fE2440744dcd733246a4dB14093664DEFD5A53",
UpCpFactory: "0xE92787F457F541a9D5Ae17C1dbdBffA8D3BA3C25",
CrowdPoolingFactory: "0x6E5f239f729c83E976a7A280F81Dd1685dd89218",
@@ -60,6 +60,7 @@ module.exports = {
DODOV2Proxy: "0x88CBf433471A0CD8240D2a12354362988b4593E5",
DSPProxy: "0x36E5238B4479d1ba0bFE47550B0B8e4f4f500EAA",
CpProxy: "0x074890524059905096caA0D1A7B5715C6203c155",
DPPProxy: "0xE8C9A78725D0451FA19878D5f8A3dC0D55FECF25",
RouteProxy: "0x3B6067D4CAa8A14c63fdBE6318F27A0bBc9F9237",
DODOMineV3Proxy: "0x9A74B169798bE874EF1C23b4092e5689969eF45E",

View File

@@ -58,6 +58,7 @@ module.exports = {
DODOV2Proxy: "",
DSPProxy: "",
CpProxy: "",
DPPProxy: "",
RouteProxy: "",
DODOMineV3Proxy: "",

View File

@@ -9,7 +9,7 @@ module.exports = {
DODOSellHelper: "0x0F859706AeE7FcF61D5A8939E8CB9dBB6c1EDA33",
DODOCalleeHelper: "0x2673E5333620bb22BD1bFB3af9Fc7012008E3b4B",
DODOV1PmmHelper: "0x2BBD66fC4898242BDBD2583BBe1d76E8b8f71445",
DODOV2RouteHelper: "0xC1CCE4C003B10052f168072A4c3c02051053d957",
DODOV2RouteHelper: "0xb48eE7B874Af8bC0e068036e55e33b5DC91C3a65",//0xC1CCE4C003B10052f168072A4c3c02051053d957
CurveSample: "",
@@ -30,7 +30,7 @@ module.exports = {
//Factory
DVMFactory: "0x790B4A80Fb1094589A3c0eFC8740aA9b0C1733fB",
DPPFactory: "0xAfe0A75DFFb395eaaBd0a7E1BBbd0b11f8609eeF",
DPPFactory: "0xd9CAc3D964327e47399aebd8e1e6dCC4c251DaAE",//0xAfe0A75DFFb395eaaBd0a7E1BBbd0b11f8609eeF
DSPFactory: "0x0fb9815938Ad069Bf90E14FE6C596c514BEDe767",
UpCpFactory: "0x4F57F6929E58AE564F6AB090fE0AEEcb39B0f270",
CrowdPoolingFactory: "0x778DF5B12170e8af8dF94356BfC864E57CE185DC",
@@ -57,6 +57,7 @@ module.exports = {
DODOV2Proxy: "",
DSPProxy: "0x2442A8B5cdf1E659F3F949A7E454Caa554D4E65a",
CpProxy: "0xA867241cDC8d3b0C07C85cC06F25a0cD3b5474d8",
DPPProxy: "0x624FC8368fE11BE00D8B2F3fE0B9D0053BEc21b9",
RouteProxy: "0x6B3D817814eABc984d51896b1015C0b89E9737Ca",
DODOMineV3Proxy: "0x3c39dCb3630D305530a30419b3DEEcea629597AC",

View File

@@ -9,7 +9,7 @@ module.exports = {
DODOSellHelper: "0x533da777aedce766ceae696bf90f8541a4ba80eb",
DODOCalleeHelper: "0x45a7E2E9D780613E047f7e78a9d3902ff854B522",
DODOV1PmmHelper: "0x6373ceB657C83C91088d328622573FB766064Ac4",
DODOV2RouteHelper: "0x0672952Fab6BD1336C57AE09E49DB6D3e78B1896",
DODOV2RouteHelper: "0x6e90797C1caaa81bAEc1cF3351d989A78b2D4E99",//0x0672952Fab6BD1336C57AE09E49DB6D3e78B1896
CurveSample: "0x5381382257C761DAc6F1509B1BA1B70dDaa6862a",
//Template
@@ -28,7 +28,7 @@ module.exports = {
//Factory
DVMFactory: "0x72d220cE168C4f361dD4deE5D826a01AD8598f6C",
DPPFactory: "0x6B4Fa0bc61Eddc928e0Df9c7f01e407BfcD3e5EF",
DPPFactory: "0x5336edE8F971339F6c0e304c66ba16F1296A2Fbe",//0x6B4Fa0bc61Eddc928e0Df9c7f01e407BfcD3e5EF
DSPFactory: "0x6fdDB76c93299D985f4d3FC7ac468F9A168577A4",
UpCpFactory: "0x78D338F9d54E9e41872E68cB1c01d9499d87eE52",
CrowdPoolingFactory: "0xE8C9A78725D0451FA19878D5f8A3dC0D55FECF25",
@@ -53,6 +53,7 @@ module.exports = {
DODOV2Proxy: "",
DSPProxy: "0x4599ed18F34cFE06820E3684bF0aACB8D75c644d",
CpProxy: "0x048B8926bb0eE9c52e05D61fDffbCCffbeE06Fc2",
DPPProxy: "0xfF7C8F518e6f1435957ed3d3E0692C94676dAE7a",
RouteProxy: "0xa2398842F37465f89540430bDC00219fA9E4D28a",
DODOMineV3Proxy: "0x0d9685D4037580F68D9F77B08971f17E1000bBdc",

View File

@@ -9,7 +9,7 @@ module.exports = {
DODOSellHelper: "0xA0Bb1FbC23a547a8D448C7c8a2336F69A9dBa1AF",
DODOCalleeHelper: "0x684D9d0768761fF0659B9f55D98F57648302ed14",
DODOV1PmmHelper: "0xFB973C79C665C0AC69E74C67be90D4C7A6f23c59",
DODOV2RouteHelper: "0x67166F14E9aCf43A822BE147eA59CdDd01A7C00d",
DODOV2RouteHelper: "0x075E8e0615F5c014e75Fc87C1B23E280005915Af",//0x67166F14E9aCf43A822BE147eA59CdDd01A7C00d
CurveSample: "0xDfb423413f9Aa62Dd8e86a73d6e89918b4C22dd8",
@@ -29,7 +29,7 @@ module.exports = {
//Factory
DVMFactory: "0xd8c77CF0F01222b07B8343A681C46eFA3faEa985",
DPPFactory: "0xF5420a3b91c457d336589217d45CcB8F7250eAed",
DPPFactory: "0x834235Cb6df67BAd0B7DDb612D316Ad8B77fAa6B",//0xF5420a3b91c457d336589217d45CcB8F7250eAed
DSPFactory: "0xaEc55245AB0cDcc03Bc5f104dAdCd0a33Ef50714",
UpCpFactory: "0xF7c3467786efAA9BD4022941ecd5a00C61b17FA9",
CrowdPoolingFactory: "0x56133d0b63abf7A15D5697dD2dB9e04730f1A9C2",
@@ -54,6 +54,7 @@ module.exports = {
DODOV2Proxy: "0xAc7cC7d2374492De2D1ce21e2FEcA26EB0d113e7",
DSPProxy: "0x9951CdEc21F42ab69D02daAAFEF4C3fc810B36FF",
CpProxy: "0x8930101c6cFbe0f3cb31E7526a16E72255388E97",
DPPProxy: "0xa10b13b55da91F0505FEf91fB91C8a4900F43488",
RouteProxy: "0xEc0fA5746E37dE75bDA9C1F874F2B75C12e505F6",
DODOMineV3Proxy: "0x50832DEdCF8b390160D892654530Fb96042d674B",

View File

@@ -9,7 +9,7 @@ module.exports = {
DODOSellHelper: "0xDfaf9584F5d229A9DBE5978523317820A8897C5A",
DODOCalleeHelper: "0x261F6cF4dF0e5c1432739cDAFD9299150FEd3dFc",
DODOV1PmmHelper: "0x18DFdE99F578A0735410797e949E8D3e2AFCB9D2",
DODOV2RouteHelper: "0x324c747885a88EA6f8115C46E0605C828ed527D3",
DODOV2RouteHelper: "0x6b0C1Ec661b776A819F5d5b2D0B622dE3419fDB0",//0x324c747885a88EA6f8115C46E0605C828ed527D3
CurveSample: "",
@@ -30,7 +30,7 @@ module.exports = {
//Factory
DVMFactory: "0x79887f65f83bdf15Bcc8736b5e5BcDB48fb8fE13",
DPPFactory: "0x95E887aDF9EAa22cC1c6E3Cb7f07adC95b4b25a8",
DPPFactory: "0xd24153244066F0afA9415563bFC7Ba248bfB7a51",//0x95E887aDF9EAa22cC1c6E3Cb7f07adC95b4b25a8
DSPFactory: "0x43C49f8DD240e1545F147211Ec9f917376Ac1e87",
UpCpFactory: "0x326c788c4C236f2bceC9476C66F8593Aa31be4Fc",
CrowdPoolingFactory: "0x42ddEc68db70F5992eB7AB22dfaD8A57109841C9",
@@ -53,6 +53,7 @@ module.exports = {
DODOV2Proxy: "0x45894C062E6f4E58B257e0826675355305dfef0d",
DSPProxy: "0xfDDCA6ffCE24dF5bE3e8AaD32081822f86178048",
CpProxy: "0x5480B32c03647ff5E5A653F0465E798DBe558B57",
DPPProxy: "0xF6f1A1Ef2f5b56bb289993F75C12Eb41e4abC2f7",
RouteProxy: "0x53eE28b9F0A6416857C1e7503032E27e80F52DA0",
DODOMineV3Proxy: "0x47a65e74dd6b6B5E3243dBb01EDEd9D55ba234Ad",

View File

@@ -14,7 +14,7 @@ module.exports = {
DODOSellHelper: "0x5e84190a270333aCe5B9202a3F4ceBf11b81bB01", //not verify
DODOCalleeHelper: "0xc4436fBAE6eBa5d95bf7d53Ae515F8A707Bd402A",
DODOV1PmmHelper: "0x3CD6D7F5fF977bf8069548eA1F9441b061162b42", //not verify
DODOV2RouteHelper: "0x6B4Fa0bc61Eddc928e0Df9c7f01e407BfcD3e5EF",
DODOV2RouteHelper: "",//0x6B4Fa0bc61Eddc928e0Df9c7f01e407BfcD3e5EF
CurveSample: "",
//Template
@@ -37,7 +37,7 @@ module.exports = {
//not verify
//Factory
DVMFactory: "0x738Ebf387A0CE0eb46b0eF8Fa5DEa2EaE6B1Df51",
DPPFactory: "0xb57Dd5c265dBb13CA014F2332069E90CD0e22e65",
DPPFactory: "",//0xb57Dd5c265dBb13CA014F2332069E90CD0e22e65
DSPFactory: "0xB76de21f04F677f07D9881174a1D8E624276314C",
UpCpFactory: "0x043957f7554275b90c5178872faE851dcfC1089D",
CrowdPoolingFactory: "0x0596908263Ef2724fBfBcAfA1c983FCD7a629038",
@@ -64,6 +64,7 @@ module.exports = {
DODOV2Proxy: "0xd9deC7c3C06e62a4c1BeEB07CadF568f496b14c2",
DSPProxy: "0x9f015aa5557ffBb47850c045Df67Bf229B07f2eA",
CpProxy: "0x357c5E9cfA8B834EDcef7C7aAbD8F9Db09119d11",
DPPProxy: "",
RouteProxy: "0x0125Cd41312F72a0774112Ca639D65A2C02e3627",
DODOMineV3Proxy: "0xb159260989012fA98af560A3Fa6D9cd11a64cf6E", //not verify

View File

@@ -1,68 +0,0 @@
module.exports = {
NEON_TEST_CONFIG: {
//DODOV1
DODO: "",
DODOZoo: "",
//TOKEN
WETH: "",
DODO: "",
//Helper
DODOSellHelper: "",
DODOCalleeHelper: "",
DODOV1PmmHelper: "",
DODOV2RouteHelper: "",
ERC20Helper: "",
DODOSwapCalcHelper: "",
MultiCall: "",
CurveSample: "",
//Template
CloneFactory: "",
FeeRateModel: "",
FeeRateDIP3: "",
PermissionManager: "",
DVM: "",
DPP: "",
DSP: "",
DPPAdmin: "",
CP: "",
ERC20MineV2: "",
ERC20MineV3: "",
ERC20: "",
CustomERC20: "",
//Factory
DVMFactory: "",
DPPFactory: "",
DSPFactory: "",
UpCpFactory: "",
CrowdPoolingFactory: "",
ERC20V2Factory: "",
DODOMineV2Factory: "",
DODOMineV3Registry: "",
//Approve
DODOApprove: "",
DODOApproveProxy: "",
//Adapter
DODOV1Adapter: "",
DODOV2Adapter: "",
UniAdapter: "",
CurveAdapter: "",
//Proxy
DODOV2Proxy: "",
DSPProxy: "",
CpProxy: "",
RouteProxy: "",
DODOMineV3Proxy: "",
//Account
multiSigAddress: "",
defaultMaintainer: ""
}
}

View File

@@ -9,7 +9,7 @@ module.exports = {
DODOSellHelper: "0x6B208E08dcF6BD51F50C5Da09d15B2D8E5C46Cf2",
DODOCalleeHelper: "0x3CD6D7F5fF977bf8069548eA1F9441b061162b42",
DODOV1PmmHelper: "0xDfaf9584F5d229A9DBE5978523317820A8897C5A",
DODOV2RouteHelper: "0x9B64c81ba54eA51e1f6B7fefb3cfF8AA6F1e2A09",
DODOV2RouteHelper: "0xa3cA30a7D523959fDDF7C9800C7121211B559D24",//0x9B64c81ba54eA51e1f6B7fefb3cfF8AA6F1e2A09
CurveSample: "",
@@ -30,7 +30,7 @@ module.exports = {
//Factory
DVMFactory: "0x9aE501385Bc7996A2A4a1FBb00c8d3820611BCB5",
DPPFactory: "0xbAb9F4ff4A19a0e8EEBC56b06750253228ffAc6E",
DPPFactory: "0xfdD51aAba2f949195a460121aA3f2D392d2524A9",//0xbAb9F4ff4A19a0e8EEBC56b06750253228ffAc6E
DSPFactory: "0x44D5dF24d5Ef52A791D6436Fa45A8D426f6de34e",
UpCpFactory: "0xE55154D09265b18aC7CDAC6E646672A5460389a1",
CrowdPoolingFactory: "0x85351262f7474Ebe23FfAcD633cf20A491F1325D",
@@ -54,6 +54,7 @@ module.exports = {
DODOV2Proxy: "0x6B4Fa0bc61Eddc928e0Df9c7f01e407BfcD3e5EF",
DSPProxy: "0x5515363c0412AdD5c72d3E302fE1bD7dCBCF93Fe",
CpProxy: "0x335aC99bb3E51BDbF22025f092Ebc1Cf2c5cC619",
DPPProxy: "0xa222e6a71D1A1Dd5F279805fbe38d5329C1d0e70",
RouteProxy: "0xd9deC7c3C06e62a4c1BeEB07CadF568f496b14c2",
DODOMineV3Proxy: "0x958f79e2998DFe417208b9A07D799265B0298e58",

View File

@@ -9,7 +9,7 @@ module.exports = {
DODOSellHelper: "0x4635FAc4471BC5B5839007f1EF65ff469ace333F",
DODOCalleeHelper: "0x87C296100df953aFa324ABB870891baD9dDBf0fC",
DODOV1PmmHelper: "0xEb06236b035f1Db7F1D181Efd635Edd621874472",
DODOV2RouteHelper: "0x80a70F228D8faBF20fdaf8274b9A7c4AE3551861",
DODOV2RouteHelper: "",//0x80a70F228D8faBF20fdaf8274b9A7c4AE3551861
//Template
CloneFactory: "0x823ECBfCCD3e6Cb67d4c9334F743BEe0E60A7349",
@@ -28,7 +28,7 @@ module.exports = {
//Factory
DVMFactory: "0x17DddEFA0c82E0c850a4Adac2aFE3F1fe977A242",
DPPFactory: "0x510b49803E356C750f3a93bA5508C0FFD9f71bDD",
DPPFactory: "",//0x510b49803E356C750f3a93bA5508C0FFD9f71bDD
DSPFactory: "0xa1ab675cB49BA0DC3F39fA4C20E216572A8dD3c8",
CrowdPoolingFactory: "0xDD43520779dDCfbDe373174Ee36aEaD39771cD4f",
UpCpFactory: "0xb09E91505347234Cb722D67042290f50F1C13749",
@@ -52,6 +52,7 @@ module.exports = {
DODOV2Proxy: "0xba001E96AF87bF9d8D0BDA667067A9921FE6d294",
DSPProxy: "0x0f6345D1d07C134BB0973AD102F38eA9195F6f78",
CpProxy: "0x2E483CBb9e76fE6543168DEd698d9244EE1ED8Dd",
DPPProxy: "",
RouteProxy: "0xe2b538a781eB5a115a1359B8f363B9703Fd19dE6",
DODOMineV3Proxy: "0xcb15BBb59AC8a4B64A4db9B8d9F66c397d89Bd22",

View File

@@ -6,7 +6,6 @@ const { MATIC_CONFIG } = require("./config/matic-config");
const { ARB_CONFIG } = require("./config/arb-config");
const { RINKEBY_CONFIG } = require("./config/rinkeby-config");
const { OK_CONFIG } = require("./config/ok-config");
const { NEON_TEST_CONFIG } = require("./config/neon-test-config");
const { MOONRIVER_CONFIG } = require("./config/moonriver-config");
const { BOBA_TEST_CONFIG } = require("./config/boba-test-config");
@@ -45,11 +44,6 @@ exports.GetConfig = function (network, accounts) {
CONFIG.multiSigAddress = accounts[0]
CONFIG.defaultMaintainer = accounts[0]
break;
case "neon_test":
CONFIG = NEON_TEST_CONFIG
CONFIG.multiSigAddress = accounts[0]
CONFIG.defaultMaintainer = accounts[0]
break;
case "boba_test":
CONFIG = BOBA_TEST_CONFIG
CONFIG.multiSigAddress = accounts[0]

View File

@@ -40,7 +40,6 @@ contract DODOV2Proxy02 is IDODOV2Proxy01, ReentrancyGuard, InitializableOwnable
address public immutable _DODO_APPROVE_PROXY_;
address public immutable _DODO_SELL_HELPER_;
address public immutable _DVM_FACTORY_;
address public immutable _DPP_FACTORY_;
mapping (address => bool) public isWhiteListed;
// ============ Events ============
@@ -66,13 +65,11 @@ contract DODOV2Proxy02 is IDODOV2Proxy01, ReentrancyGuard, InitializableOwnable
constructor(
address dvmFactory,
address dppFactory,
address payable weth,
address dodoApproveProxy,
address dodoSellHelper
) public {
_DVM_FACTORY_ = dvmFactory;
_DPP_FACTORY_ = dppFactory;
_WETH_ = weth;
_DODO_APPROVE_PROXY_ = dodoApproveProxy;
_DODO_SELL_HELPER_ = dodoSellHelper;
@@ -208,93 +205,6 @@ contract DODOV2Proxy02 is IDODOV2Proxy01, ReentrancyGuard, InitializableOwnable
}
}
// ============ DPP Functions (create & reset) ============
// function createDODOPrivatePool(
// address baseToken,
// address quoteToken,
// uint256 baseInAmount,
// uint256 quoteInAmount,
// uint256 lpFeeRate,
// uint256 i,
// uint256 k,
// bool isOpenTwap,
// uint256 deadLine
// )
// external
// override
// payable
// preventReentrant
// judgeExpired(deadLine)
// returns (address newPrivatePool)
// {
// newPrivatePool = IDODOV2(_DPP_FACTORY_).createDODOPrivatePool();
// address _baseToken = baseToken;
// address _quoteToken = quoteToken;
// _deposit(msg.sender, newPrivatePool, _baseToken, baseInAmount, _baseToken == _ETH_ADDRESS_);
// _deposit(
// msg.sender,
// newPrivatePool,
// _quoteToken,
// quoteInAmount,
// _quoteToken == _ETH_ADDRESS_
// );
// if (_baseToken == _ETH_ADDRESS_) _baseToken = _WETH_;
// if (_quoteToken == _ETH_ADDRESS_) _quoteToken = _WETH_;
// IDODOV2(_DPP_FACTORY_).initDODOPrivatePool(
// newPrivatePool,
// msg.sender,
// _baseToken,
// _quoteToken,
// lpFeeRate,
// k,
// i,
// isOpenTwap
// );
// }
// function resetDODOPrivatePool(
// address dppAddress,
// uint256[] memory paramList, //0 - newLpFeeRate, 1 - newI, 2 - newK
// uint256[] memory amountList, //0 - baseInAmount, 1 - quoteInAmount, 2 - baseOutAmount, 3- quoteOutAmount
// uint8 flag, // 0 - ERC20, 1 - baseInETH, 2 - quoteInETH, 3 - baseOutETH, 4 - quoteOutETH
// uint256 minBaseReserve,
// uint256 minQuoteReserve,
// uint256 deadLine
// ) external override payable preventReentrant judgeExpired(deadLine) {
// _deposit(
// msg.sender,
// dppAddress,
// IDODOV2(dppAddress)._BASE_TOKEN_(),
// amountList[0],
// flag == 1
// );
// _deposit(
// msg.sender,
// dppAddress,
// IDODOV2(dppAddress)._QUOTE_TOKEN_(),
// amountList[1],
// flag == 2
// );
// require(IDODOV2(IDODOV2(dppAddress)._OWNER_()).reset(
// msg.sender,
// paramList[0],
// paramList[1],
// paramList[2],
// amountList[2],
// amountList[3],
// minBaseReserve,
// minQuoteReserve
// ), "Reset Failed");
// _withdraw(msg.sender, IDODOV2(dppAddress)._BASE_TOKEN_(), amountList[2], flag == 3);
// _withdraw(msg.sender, IDODOV2(dppAddress)._QUOTE_TOKEN_(), amountList[3], flag == 4);
// }
// ============ Swap ============
function dodoSwapV2ETHToToken(

View File

@@ -47,7 +47,7 @@ contract DODODppProxy is ReentrancyGuard {
// ============ Modifiers ============
modifier judgeExpired(uint256 deadLine) {
require(deadLine >= block.timestamp, "DODOCpProxy: EXPIRED");
require(deadLine >= block.timestamp, "DPPProxy: EXPIRED");
_;
}

View File

@@ -40,6 +40,7 @@ const DODOApproveProxy = artifacts.require("DODOApproveProxy");
const DODODspProxy = artifacts.require("DODODspProxy");
const DODOCpProxy = artifacts.require("DODOCpProxy");
const DODODppProxy = artifacts.require("DODODppProxy");
const DODORouteProxy = artifacts.require("DODORouteProxy");
const DODOMineV3Proxy = artifacts.require("DODOMineV3Proxy");
const DODOProxyV2 = artifacts.require("DODOV2Proxy02");
@@ -102,6 +103,7 @@ module.exports = async (deployer, network, accounts) => {
let DODOV2ProxyAddress = CONFIG.DODOV2Proxy;
let DODODspProxyAddress = CONFIG.DSPProxy;
let DODOCpProxyAddress = CONFIG.CpProxy;
let DODODppProxyAddress = CONFIG.DPPProxy;
let DODOMineV3ProxyAddress = CONFIG.DODOMineV3Proxy;
let DODORouteProxyAddress = CONFIG.RouteProxy;
@@ -399,7 +401,6 @@ module.exports = async (deployer, network, accounts) => {
await deployer.deploy(
DODOProxyV2,
DvmFactoryAddress,
DppFactoryAddress,
WETHAddress,
DODOApproveProxyAddress,
DODOSellHelperAddress
@@ -434,6 +435,17 @@ module.exports = async (deployer, network, accounts) => {
logger.log("CpProxy address: ", DODOCpProxy.address);
}
if (DODODppProxyAddress == "") {
await deployer.deploy(
DODODppProxy,
WETHAddress,
DODOApproveProxyAddress,
DppFactoryAddress
);
DODODppProxyAddress = DODODppProxy.address;
logger.log("DPPProxy address: ", DODODppProxy.address);
}
if (DODOMineV3ProxyAddress == "") {
await deployer.deploy(
DODOMineV3Proxy,
@@ -465,7 +477,7 @@ module.exports = async (deployer, network, accounts) => {
var tx;
//ApproveProxy init以及添加ProxyList
const DODOApproveProxyInstance = await DODOApproveProxy.at(DODOApproveProxyAddress);
tx = await DODOApproveProxyInstance.init(multiSigAddress, [DODOV2ProxyAddress, DODODspProxyAddress, DODOCpProxyAddress, DODOMineV3ProxyAddress, DODORouteProxyAddress]);
tx = await DODOApproveProxyInstance.init(multiSigAddress, [DODOV2ProxyAddress, DODODspProxyAddress, DODOCpProxyAddress, DODODppProxyAddress, DODOMineV3ProxyAddress, DODORouteProxyAddress]);
logger.log("DODOApproveProxy Init tx: ", tx.tx);
//Approve init
@@ -495,8 +507,8 @@ module.exports = async (deployer, network, accounts) => {
//DPPFactory add DODProxy as admin
const dppFactoryInstance = await DPPFactory.at(DppFactoryAddress);
var tx = await dppFactoryInstance.addAdminList(DODOV2ProxyAddress);
logger.log("DPPFactory Init tx: ", tx.tx);
var tx = await dppFactoryInstance.addAdminList(DODODppProxyAddress);
logger.log("DPPFactory Add DPPProxy tx: ", tx.tx);
}
}