From df884fb5f9f9907497b00d1a52ed19f1e69507d6 Mon Sep 17 00:00:00 2001 From: owen05 Date: Fri, 5 Feb 2021 11:45:36 +0800 Subject: [PATCH] update vdodo --- contracts/DODOToken/vDODOToken.sol | 6 +++++- deploy-detail-periphery.txt | 10 ++++++++++ deploy-detail-v2.0.txt | 11 +++++++++++ kovan-mock-v2.0.txt | 6 ++++++ migrations/3_deploy_v2.js | 14 +++++++------- migrations/5_deploy_periphery.js | 2 +- test/utils/VDODOContext.ts | 3 ++- truffle-config.js | 2 +- 8 files changed, 43 insertions(+), 11 deletions(-) diff --git a/contracts/DODOToken/vDODOToken.sol b/contracts/DODOToken/vDODOToken.sol index 6422f8f..7c98d89 100644 --- a/contracts/DODOToken/vDODOToken.sol +++ b/contracts/DODOToken/vDODOToken.sol @@ -40,6 +40,7 @@ contract vDODOToken is InitializableOwnable { address immutable _DODO_TOKEN_; address immutable _DODO_APPROVE_PROXY_; + address immutable _DODO_TEAM_; address public _DOOD_GOV_; address public _DODO_CIRCULATION_HELPER_; @@ -91,12 +92,14 @@ contract vDODOToken is InitializableOwnable { constructor( address dodoGov, address dodoToken, - address dodoApproveProxy + address dodoApproveProxy, + address dodoTeam ) public { _DOOD_GOV_ = dodoGov; _DODO_TOKEN_ = dodoToken; _DODO_APPROVE_PROXY_ = dodoApproveProxy; lastRewardBlock = uint128(block.number); + _DODO_TEAM_ = dodoTeam; } // ============ Ownable Functions ============` @@ -153,6 +156,7 @@ contract vDODOToken is InitializableOwnable { uint256 increSuperiorVDODO = DecimalMath.mulFloor(newVdodoAmount, _SUPERIOR_RATIO_); if (user.superior == address(0)) { + require(superiorAddress == _DODO_TEAM_ || userInfo[superiorAddress].superior != address(0), "vDODOToken: INVALID_SUPERIOR_ADDRESS"); user.superior = superiorAddress; } diff --git a/deploy-detail-periphery.txt b/deploy-detail-periphery.txt index 47e5026..fbbf6ae 100644 --- a/deploy-detail-periphery.txt +++ b/deploy-detail-periphery.txt @@ -4,3 +4,13 @@ Deploy time: 2021/2/4 下午4:56:38 Deploy type: DODOBscToken DODOBscTokenAddress: 0x67ee3Cb086F8a16f34beE3ca72FAD36F7Db929e2 Init DODOBscTokenAddress Tx: 0xf66264c2669f904527de63fab104250275247c014bfb6f42f57441997551cef6 +==================================================== +network type: kovan +Deploy time: 2021/2/4 下午6:12:05 +Deploy type: vDODOToken +vDODOTokenAddress: 0x2cF0B8F94361c52f23c1bBC0d2F213Ea5cD61397 +Init vDODOTokenAddress Tx: 0xed856ab816302df0575dc05910246d37ff4f239bf3c75f6969560df5d725fcf0 +DODOCirculationHelperAddress: 0x0bfb5Beb854e3104f47C1Cb057DEEB90CB7B9464 +Init DODOCirculationHelperAddress Tx: 0x8b2d1b9d3455db665f7ac06b465f1bfc2e0ccddb0aa5cd4bca72bc9c7b69b2d9 +vDODOToken changeReward tx: 0x8ed4b35edff17b8ef9480b9c40b7673cf7a50088afb9fb7c7fe50d439930c4cf +vDODOToken setDODOCirculationHelper tx: 0x402a9d1abd299ac8df019cff5d6f79e49b82cae34b356a0f1e0afdb47d7bd811 diff --git a/deploy-detail-v2.0.txt b/deploy-detail-v2.0.txt index 9fe6151..70e2cd5 100644 --- a/deploy-detail-v2.0.txt +++ b/deploy-detail-v2.0.txt @@ -580,3 +580,14 @@ DODOCalleeHelperAddress: 0xaaffAd1017D6a13E026A00121BF258C616B25f7C network type: kovan Deploy time: 2021/2/4 下午5:16:38 DODOCalleeHelperAddress: 0x36ce1831941d35c3588759B2D084E240a094ad4A +==================================================== +network type: kovan +Deploy time: 2021/2/4 下午5:51:45 +Deploy type: V2 +DODOApprove Address: 0x9e159C2932ceFCD0FdC21458fBAd99a535BC1ccB +DODOApproveProxy Address: 0x5ee5B85ddf0b842e0d65f0d295F6954eceFBEeD4 +DODOV2Proxy02 Address: 0x78A6b82ed33B73B8A5702a4Dcb16441bcd2ADA08 +Init DODOProxyV2 Tx: 0x42b4de22ef3a32db868174cc2f99bc3acdc17a77cafa9435e4be998e347cf492 +DODOApproveProxy Init tx: 0x34d085f14d73db5df4564d40c74151404ce66f7b14edb7308986bbfc05072f57 +DODOApprove Init tx: 0x51d7a94362e44515c6e67b9f9535889863977ea0a3a6f58cc2e8524bdf03f4c3 +DODOIncentive ChangeProxy tx: 0xb03cda4c06262131e28c36bed506be52d0621029e4a8dd57fa96d3aecdb81691 diff --git a/kovan-mock-v2.0.txt b/kovan-mock-v2.0.txt index 7368737..16aea2a 100644 --- a/kovan-mock-v2.0.txt +++ b/kovan-mock-v2.0.txt @@ -445,3 +445,9 @@ Create DPP: 0xd7f02D1b4F9495B549787808503Ecfd231C3fbDA-0x156595bAF85D5C29E91d959 ==================================================== network type: kovan Deploy time: 2021/2/4 下午5:17:14 +==================================================== +network type: kovan +Deploy time: 2021/2/4 下午5:54:17 +==================================================== +network type: kovan +Deploy time: 2021/2/4 下午6:12:03 diff --git a/migrations/3_deploy_v2.js b/migrations/3_deploy_v2.js index c23cb15..d232545 100644 --- a/migrations/3_deploy_v2.js +++ b/migrations/3_deploy_v2.js @@ -75,9 +75,9 @@ module.exports = async (deployer, network, accounts) => { DODOSellHelperAddress = "0xbdEae617F2616b45DCB69B287D52940a76035Fe3"; WETHAddress = "0x5eca15b12d959dfcf9c71c59f8b467eb8c6efd0b"; chiAddress = "0x0000000000004946c0e9f43f4dee607b0ef1fa1c"; - DODOCalleeHelperAddress = "0xf45e57FE0c0Bf759E34152179B2dA0a4e1a6BC9B"; + DODOCalleeHelperAddress = "0x36ce1831941d35c3588759B2D084E240a094ad4A"; DODOV1PmmHelperAddress = "0xC972069473a686b1c11Bd9347D719c87e6745d39"; - DODORouteV2HelperAddress = ""; + DODORouteV2HelperAddress = "0xD5171044E369Ef316125da5A0Af8E75ea6Cd3A90"; //Template CloneFactoryAddress = "0xf7959fe661124C49F96CF30Da33729201aEE1b27"; @@ -85,16 +85,16 @@ module.exports = async (deployer, network, accounts) => { DefaultPermissionAddress = "0xACc7E23368261e1E02103c4e5ae672E7D01f5797"; DvmTemplateAddress = "0xA6384D1501842e9907D43148E2ca0d50E4ad56E2"; - DppTemplateAddress = ""; - DppAdminTemplateAddress = ""; + DppTemplateAddress = "0x6b9Db3908ddFD853AD2A42Ab75b5de3f22f137a5"; + DppAdminTemplateAddress = "0x2d69731283ac620760309d8b561De11C6166a5F5"; CpTemplateAddress = "0x81c802080c3CE0dE98fcb625670A14Eb8440184a"; //Factory DvmFactoryAddress = "0xE842d8c9A54B23C4D0cf208daCA3882c0c311353"; - DppFactoryAddress = ""; + DppFactoryAddress = "0x80c03749C22Acbe5EaFEb1d550a32C707a67fc34"; CpFactoryAddress = "0xD25e0A9A464f50191d9C879bE818FbA44680E980"; //Approve - DODOApproveAddress = ""; - DODOApproveProxyAddress = ""; + DODOApproveAddress = "0x9e159C2932ceFCD0FdC21458fBAd99a535BC1ccB"; + DODOApproveProxyAddress = "0x5ee5B85ddf0b842e0d65f0d295F6954eceFBEeD4"; DODOIncentiveAddress = "0x1f69E3CEAbDc464Ab11bceB15726530CD8AC535E"; DODOTokenAddress = "0xfF2985D13953Cb92ecc585aA2B6A4AF8cB46068f"; //Account diff --git a/migrations/5_deploy_periphery.js b/migrations/5_deploy_periphery.js index a211ebe..6d2c2e7 100644 --- a/migrations/5_deploy_periphery.js +++ b/migrations/5_deploy_periphery.js @@ -19,7 +19,7 @@ module.exports = async (deployer, network, accounts) => { if (network == "kovan") { DODOTokenAddress = "0xfF2985D13953Cb92ecc585aA2B6A4AF8cB46068f"; - DODOApproveProxyAddress = ""; + DODOApproveProxyAddress = "0x5ee5B85ddf0b842e0d65f0d295F6954eceFBEeD4"; DODOCirculationHelperAddress = ""; vDODOTokenAddress = ""; GovernanceAddress = "0x0000000000000000000000000000000000000000"; diff --git a/test/utils/VDODOContext.ts b/test/utils/VDODOContext.ts index ccccef0..baca4fb 100644 --- a/test/utils/VDODOContext.ts +++ b/test/utils/VDODOContext.ts @@ -78,7 +78,8 @@ export class VDODOContext { [ "0x0000000000000000000000000000000000000000", this.DODO.options.address, - this.DODOApproveProxy.options.address + this.DODOApproveProxy.options.address, + this.Deployer ] ) diff --git a/truffle-config.js b/truffle-config.js index 7ac5f39..d9533d3 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -49,7 +49,7 @@ module.exports = { BSCMigration: false, DODOBscToken: false, vDODOToken: false, - CALLEE: true, + CALLEE: false, }, networks: {