diff --git a/config/ok-config.js b/config/ok-config.js new file mode 100644 index 0000000..ae6d3da --- /dev/null +++ b/config/ok-config.js @@ -0,0 +1,88 @@ +module.exports = { + OK_CONFIG: { + //TOKEN + WETH: "0x8f8526dbfd6e38e3d8307702ca8469bae6c56c15", + CHI: "0x0000000000000000000000000000000000000000", + DODO: "", + + //Helper + DODOSellHelper: "0x6B208E08dcF6BD51F50C5Da09d15B2D8E5C46Cf2", + DODOCalleeHelper: "0x3CD6D7F5fF977bf8069548eA1F9441b061162b42", + DODOV1PmmHelper: "0xDfaf9584F5d229A9DBE5978523317820A8897C5A", + DODOV2RouteHelper: "0x9B64c81ba54eA51e1f6B7fefb3cfF8AA6F1e2A09", + + //Template + CloneFactory: "0x2BBD66fC4898242BDBD2583BBe1d76E8b8f71445", + FeeRateModel: "0x18DFdE99F578A0735410797e949E8D3e2AFCB9D2", + PermissionManager: "0x18b0bD918b55f995Fd404B872404378A62cb403b", + DVM: "0x550B2e7bD9605b8dcdd20d01bA73f1feB6ce289b", + DPP: "0x02fcb21dc1cf221939c1d4277fb54016b5d32bc7", + DSP: "0xbef0C8Cd420b76e9d31509abbfd7f8C9f664527c", + DPPAdmin: "0x72d220cE168C4f361dD4deE5D826a01AD8598f6C", + CP: "0x80930Cb1849F7D42531506fF45E66724338A821b", + ERC20MineV3: "0xc4436fBAE6eBa5d95bf7d53Ae515F8A707Bd402A", + + ERC20: "0xB5Dc5E183c2aCf02aB879A8569aB4EDAf147d537", + MintableERC20: "0xf50BDc9E90B7a1c138cb7935071b85c417C4cb8e", + CustomERC20: "0xa2CB66EBB947D217f61510882096F6e95c1DE97D", + + //Factory + DVMFactory: "0x9aE501385Bc7996A2A4a1FBb00c8d3820611BCB5", + DPPFactory: "0xbAb9F4ff4A19a0e8EEBC56b06750253228ffAc6E", + DSPFactory: "0x44D5dF24d5Ef52A791D6436Fa45A8D426f6de34e", + UpCpFactory: "0xE55154D09265b18aC7CDAC6E646672A5460389a1", + CrowdPoolingFactory: "0x85351262f7474Ebe23FfAcD633cf20A491F1325D", + ERC20Factory: "0xE8C9A78725D0451FA19878D5f8A3dC0D55FECF25", + ERC20V2Factory: "0xfDDCA6ffCE24dF5bE3e8AaD32081822f86178048", + DODOMineV3Registry: "0xb159260989012fA98af560A3Fa6D9cd11a64cf6E", + + //Approve + DODOApprove: "0x7737fd30535c69545deeEa54AB8Dd590ccaEBD3c", + DODOApproveProxy: "0xaeB5CF31b97dce6134e416129845e01106fFB177", + + + //Adapter + DODOV1Adapter: "0xbe9a66e49503e84ae59a4d0545365AABedf33b40", + DODOV2Adapter: "0xa356867fDCEa8e71AEaF87805808803806231FdC", + UniAdapter: "0xc6962a577A3Be5311f9f9Ab9B8b6A69a25bBc817", + + //Proxy + DODOV2Proxy: "0x6B4Fa0bc61Eddc928e0Df9c7f01e407BfcD3e5EF", + DSPProxy: "0x5515363c0412AdD5c72d3E302fE1bD7dCBCF93Fe", + CpProxy: "0x335aC99bb3E51BDbF22025f092Ebc1Cf2c5cC619", + RouteProxy: "0xd9deC7c3C06e62a4c1BeEB07CadF568f496b14c2", + DODOMineV3Proxy: "0x958f79e2998DFe417208b9A07D799265B0298e58", + + //Account + multiSigAddress: "0xef49a6DBa1C8DF859E49c17E9A485B439c7689d3", + defaultMaintainer: "0xef49a6DBa1C8DF859E49c17E9A485B439c7689d3", + + + //================== NFT ==================== + BuyoutModel: "", + Fragment: "", + NFTCollateralVault: "", + DODONFTRouteHelper: "", + + InitializableERC721: "", + InitializableERC1155: "", + NFTTokenFactory: "", + + DodoNftErc721: "", + DodoNftErc1155: "", + + DODONFTRegistry: "", + DODONFTProxy: "", + + //================= DropsV1 ================= + MysteryBoxV1: "", + RandomGenerator: "", + RandomPool: [ + "", + ], + + //================= DropsV2 ================== + DropsFeeModel: "", + DropsProxy: "" + } +} \ No newline at end of file diff --git a/configAdapter.js b/configAdapter.js index 46a0668..a4fbd72 100644 --- a/configAdapter.js +++ b/configAdapter.js @@ -7,6 +7,7 @@ const { MBTESTNET_CONFIG } = require("./config/mbtestnet-config"); 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"); exports.GetConfig = function (network, accounts) { var CONFIG = {} @@ -26,6 +27,9 @@ exports.GetConfig = function (network, accounts) { case "arb": CONFIG = ARB_CONFIG break; + case "ok": + CONFIG = OK_CONFIG + break; //testnet case "kovan": CONFIG = KOVAN_CONFIG diff --git a/contracts/SmartRoute/proxies/DODORouteProxy.sol b/contracts/SmartRoute/proxies/DODORouteProxy.sol index 3cc091a..1432391 100644 --- a/contracts/SmartRoute/proxies/DODORouteProxy.sol +++ b/contracts/SmartRoute/proxies/DODORouteProxy.sol @@ -194,9 +194,7 @@ contract DODORouteProxy { } if(assetFrom[i-1] == address(this)) { - uint256 curAmount = curTotalAmount.div(curTotalWeight).mul(curPoolInfo.weight); - //can improved - // uint256 curAmount = curTotalAmount.mul(curPoolInfo.weight).div(curTotalWeight); + uint256 curAmount = curTotalAmount.mul(curPoolInfo.weight).div(curTotalWeight); if(curPoolInfo.poolEdition == 1) { //For using transferFrom pool (like dodoV1, Curve) diff --git a/deploy-detail-periphery.txt b/deploy-detail-periphery.txt index ee25932..eee8371 100644 --- a/deploy-detail-periphery.txt +++ b/deploy-detail-periphery.txt @@ -578,3 +578,29 @@ Init DODOMineV3Proxy Tx: 0xa24b951703bdda5fd697ce49ddbb491d338cb4c9e35bd93dc6a3c network type: arb Deploy time: 2021/7/28 下午1:04:45 Deploy type: MineV3 +==================================================== +network type: ok +Deploy time: 2021/8/6 下午10:19:24 +Deploy type: ERC20V2Factory +CustomERC20Address: 0xa2CB66EBB947D217f61510882096F6e95c1DE97D +ERC20V2FactoryAddress: 0xfDDCA6ffCE24dF5bE3e8AaD32081822f86178048 +Init ERC20V2Factory Tx: 0x8ff931926fa8ce62606c3286e0659950693dbb050b18fc0045d7fecd29770054 +==================================================== +network type: ok +Deploy time: 2021/8/6 下午10:26:46 +Deploy type: MineV3 +ERC20MineV3Address: 0x45894C062E6f4E58B257e0826675355305dfef0d +DODOMineV3RegistryAddress: 0xb159260989012fA98af560A3Fa6D9cd11a64cf6E +Init DODOMineV3Registry Tx: 0x2206547a2b59fe48de9e8702159e101f3e7409777ef336fae404bcf9dfdd81c6 +DODOMineV3ProxyAddress: 0x958f79e2998DFe417208b9A07D799265B0298e58 +Init DODOMineV3Proxy Tx: 0xae19341581ab4ece164a980c1e83df416f48d301e58ed6be938fbf27af0b7dbe +==================================================== +network type: ok +Deploy time: 2021/8/6 下午10:31:11 +Deploy type: DODORouteProxy +DODORouteProxy Address: 0xB5397B2210f49e96a5EB2c9747Aa2bD9397d90C0 +==================================================== +network type: ok +Deploy time: 2021/8/7 下午6:20:16 +Deploy type: DODORouteProxy +DODORouteProxy Address: 0xd9deC7c3C06e62a4c1BeEB07CadF568f496b14c2 diff --git a/truffle-config.js b/truffle-config.js index 6727aa5..a1bb0c2 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -160,6 +160,18 @@ module.exports = { skipDryRun: true }, + ok: { + networkCheckTimeout: 100000, + provider: () => { + return new HDWalletProvider(privKey, 'https://exchainrpc.okex.org') + }, + gasPrice: 100000000, + network_id: 66, + confirmations: 5, + timeoutBlocks: 200, + skipDryRun: true + }, + omgTest: { networkCheckTimeout: 100000, provider: () => {