diff --git a/config/kovan-config.js b/config/kovan-config.js index 09be771..bad5d8f 100644 --- a/config/kovan-config.js +++ b/config/kovan-config.js @@ -77,8 +77,8 @@ module.exports = { //================= MysteryBox ================= - MysteryBoxV1: "0xC3745Dd86bcAAA1263ce444ef9C87efEAc1e720A", - RandomGenerator: "0x0E45F7C5419aD9cb096b535C8498de18638BE42e", + MysteryBoxV1: "0x87457A7FDFE0a4A57aABB369A21690bF67b8dDbD", + RandomGenerator: "0x53F54E4760FA5f839e5624782D032495613DF218", RandomPool: [ "0xa2e0ef85618732d80e5ef362773da1c92e8b1c57", "0xaCfc959e0E85726d09A36E6DFdD56FB2e5dB8F77", diff --git a/contracts/lib/RandomGenerator.sol b/contracts/lib/RandomGenerator.sol index d85e36a..e162b28 100644 --- a/contracts/lib/RandomGenerator.sol +++ b/contracts/lib/RandomGenerator.sol @@ -19,7 +19,7 @@ contract RandomGenerator { address[] public pools; constructor(address[] memory _pools) public { - for (uint256 i = 0; i < pools.length; i++) { + for (uint256 i = 0; i < _pools.length; i++) { pools.push(_pools[i]); } } diff --git a/deploy-nft.txt b/deploy-nft.txt index cfe25fb..d46b08d 100644 --- a/deploy-nft.txt +++ b/deploy-nft.txt @@ -147,3 +147,38 @@ Deploy type: MysteryBoxV1 RandomGeneratorAddress: 0x0E45F7C5419aD9cb096b535C8498de18638BE42e MysteryBoxV1Address: 0xC3745Dd86bcAAA1263ce444ef9C87efEAc1e720A Init MysteryBoxV1 Tx: 0x9e767f2f7930985ba2b186021683380b7ed0dd5b6495d96b19373aad8cbb4cbb +==================================================== +network type: rinkeby +Deploy time: 2021/4/15 下午12:42:59 +Deploy type: MysteryBoxV1 +==================================================== +network type: rinkeby +Deploy time: 2021/4/15 下午12:46:35 +Deploy type: MysteryBoxV1 +==================================================== +network type: rinkeby +Deploy time: 2021/4/15 下午12:49:37 +Deploy type: MysteryBoxV1 +==================================================== +network type: kovan +Deploy time: 2021/4/15 下午1:06:51 +Deploy type: MysteryBoxV1 +RandomGeneratorAddress: 0x450e7974870db053650A8300A2a5fDc3b8EEC4B3 +==================================================== +network type: kovan +Deploy time: 2021/4/15 下午1:23:04 +Deploy type: MysteryBoxV1 +RandomGeneratorAddress: 0x53F54E4760FA5f839e5624782D032495613DF218 +MysteryBoxV1Address: 0x87457A7FDFE0a4A57aABB369A21690bF67b8dDbD +Init MysteryBoxV1 Tx: 0x1019faa5caff6656b5991cec9ce05794757026ed4c3ce03beb9bd12261182fec +==================================================== +network type: rinkeby +Deploy time: 2021/4/15 下午1:29:37 +Deploy type: MysteryBoxV1 +==================================================== +network type: rinkeby +Deploy time: 2021/4/15 下午1:31:27 +Deploy type: MysteryBoxV1 +RandomGeneratorAddress: 0x7e21BFAcDB5062C071Fad17451E85f070DDa5d8F +MysteryBoxV1Address: 0x215BD4d983c571a840b89028CC005B6FF0734EbE +Init MysteryBoxV1 Tx: 0x15439f29a1c7b446f2d0dcda7f21dcfdd2ce3c197e8c0a5d1338621ecdb9ddab diff --git a/migrations/5_deploy_nft.js b/migrations/5_deploy_nft.js index 3931581..40b4d38 100644 --- a/migrations/5_deploy_nft.js +++ b/migrations/5_deploy_nft.js @@ -58,11 +58,7 @@ module.exports = async (deployer, network, accounts) => { logger.log("Deploy type: MysteryBoxV1"); if (RandomGeneratorAddress == "") { - await deployer.deploy(RandomGenerator,[ - RandomPool[0], - RandomPool[1], - RandomPool[2], - ]); + await deployer.deploy(RandomGenerator, RandomPool); RandomGeneratorAddress = RandomGenerator.address; logger.log("RandomGeneratorAddress: ", RandomGeneratorAddress); } diff --git a/truffle-config.js b/truffle-config.js index c0fd336..edea354 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -60,7 +60,8 @@ module.exports = { MULTIHOP: false, CpProxy: false, ERC20V2Factory: false, - DEPLOY_NFT: false + DEPLOY_NFT: false, + MYSTERYBOX_V1: false }, networks: { @@ -93,7 +94,6 @@ module.exports = { networkCheckTimeout: 100000, provider: function () { return new HDWalletProvider(privKey, "https://rinkeby.infura.io/v3/" + infuraId); - // return new HDWalletProvider(privKey, "https://eth-rinkeby.dodoex.io"); }, gas: 10000000, gasPrice: 1500000000,