From 8da3ee1ec50966fca9a2c80d424040c45c0f785e Mon Sep 17 00:00:00 2001 From: owen05 Date: Mon, 12 Apr 2021 20:44:13 +0800 Subject: [PATCH] fix deploy --- contracts/DODOToken/DODOMineV2/ERC20Mine.sol | 5 +++-- contracts/DODOToken/DODOMineV2/vDODOMine.sol | 5 +++-- deploy-detail-periphery.txt | 18 ++++++++++++++++++ migrations/4_deploy_periphery.js | 16 ++++++++-------- truffle-config.js | 1 + 5 files changed, 33 insertions(+), 12 deletions(-) diff --git a/contracts/DODOToken/DODOMineV2/ERC20Mine.sol b/contracts/DODOToken/DODOMineV2/ERC20Mine.sol index 28f36c0..147ca67 100644 --- a/contracts/DODOToken/DODOMineV2/ERC20Mine.sol +++ b/contracts/DODOToken/DODOMineV2/ERC20Mine.sol @@ -18,9 +18,10 @@ contract ERC20Mine is BaseMine { // ============ Storage ============ - address public immutable _TOKEN_; + address public _TOKEN_; - constructor(address token) public { + function init(address owner, address token) external { + super.initOwner(owner); _TOKEN_ = token; } diff --git a/contracts/DODOToken/DODOMineV2/vDODOMine.sol b/contracts/DODOToken/DODOMineV2/vDODOMine.sol index 1179700..427bcea 100644 --- a/contracts/DODOToken/DODOMineV2/vDODOMine.sol +++ b/contracts/DODOToken/DODOMineV2/vDODOMine.sol @@ -21,9 +21,10 @@ contract vDODOMine is BaseMine { using SafeMath for uint256; // ============ Storage ============ - address public immutable _vDODO_TOKEN_; + address public _vDODO_TOKEN_; - constructor(address vDODOToken) public { + function init(address owner, address vDODOToken) external { + super.initOwner(owner); _vDODO_TOKEN_ = vDODOToken; } diff --git a/deploy-detail-periphery.txt b/deploy-detail-periphery.txt index bebdad5..1b4b8a7 100644 --- a/deploy-detail-periphery.txt +++ b/deploy-detail-periphery.txt @@ -335,3 +335,21 @@ erc20Mine address: 0x888B9d4C25664F8B1BF744e8F4397d1429314155 Init ERC20Mine Tx: 0x993b5ccbc038eaeb58db7891f74eb53e4b47fada5051b179fbbf68351295d4d7 Add rewardToken0 Tx: 0x78add1f55782e99e84bd0390049750c03b470bca1d4fbf0cd8b145c3945d43e8 Add rewardToken1 Tx: 0x52edb6a993999817fe26acbd92c267b63ac36c94989f4f2676ba81b9c452dcce +==================================================== +network type: kovan +Deploy time: 2021/4/12 下午8:12:13 +Deploy type: ERC20Mine +erc20Mine address: 0x3b5a083dB74A639CdB7940298783ec975cDdfe76 +Init ERC20Mine Tx: 0x318ecc12d9452f1b7e518cbce2eaf9d03e9f6b76d58863de3e5b6bcd88b4d90e +==================================================== +network type: kovan +Deploy time: 2021/4/12 下午8:15:52 +Deploy type: ERC20Mine +erc20Mine address: 0x5cba33Ecd715c780922210758813Ad599E98bDB8 +Init ERC20Mine Tx: 0xf73f5b7a8694fcac91b9f72ac8b604389db792072fc4f4ef33c4bbea7c2ff510 +Add rewardToken0 Tx: 0xcee550cfc5fc52f9b0224247927ee63a4e9bf83ac0332c3b5c4979d2bb2d3088 +Add rewardToken1 Tx: 0xe5127653d59ba4530be0e2d873adc80191005ee1b131db45deb06d141975a4af +==================================================== +network type: kovan +Deploy time: 2021/4/12 下午8:32:13 +Deploy type: ERC20Mine diff --git a/migrations/4_deploy_periphery.js b/migrations/4_deploy_periphery.js index 528bcd5..bad38db 100644 --- a/migrations/4_deploy_periphery.js +++ b/migrations/4_deploy_periphery.js @@ -52,20 +52,18 @@ module.exports = async (deployer, network, accounts) => { var erc20TokenAddress = "0xd8C30a4E866B188F16aD266dC3333BD47F34ebaE"; var owner = multiSigAddress; - await deployer.deploy( - ERC20Mine, - erc20TokenAddress - ); + await deployer.deploy(ERC20Mine); + logger.log("erc20Mine address: ", ERC20Mine.address); const erc20MineInstance = await ERC20Mine.at(ERC20Mine.address); - var tx = await erc20MineInstance.initOwner(owner); + var tx = await erc20MineInstance.init(owner, erc20TokenAddress); logger.log("Init ERC20Mine Tx:", tx.tx); //add Token var reward0Token = "0xd7f02d1b4f9495b549787808503ecfd231c3fbda" var reward1Token = "0xfe1133ea03d701c5006b7f065bbf987955e7a67c" var rewardPerBlock = "100000000000000000" //0.1 - var startBlock = 24229900 + var startBlock = 24231000 var endBlock = 24270000 tx = await erc20MineInstance.addRewardToken( reward0Token, @@ -82,8 +80,10 @@ module.exports = async (deployer, network, accounts) => { endBlock ); logger.log("Add rewardToken1 Tx:", tx.tx); - - //transfer Token to vault + + //init + //addToken + //TransferToken } if(deploySwitch.LockedVault) { diff --git a/truffle-config.js b/truffle-config.js index 4e47f3e..6d5836c 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -166,6 +166,7 @@ module.exports = { enabled: true, runs: 200, }, + evmVersion: "istanbul" }, }, },