diff --git a/.gitignore b/.gitignore index 1fee738..84e33f1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ node_modules .secret +.secret_20 .DS_Store openzepplelin .vscode/ diff --git a/config/config.js b/config/config.js index 554ff64..2ae8c68 100644 --- a/config/config.js +++ b/config/config.js @@ -7,15 +7,15 @@ const market = { } const admins = { - admin: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e", + admin: "0x760888706690CA0eB1EeF1E84787E05fc96e01F0", proposers: [ - "0x14248857e0E03982F2C48B0FD7B2a223a884fbF3", - "0x6D0F7A84d7184B02B97C403a3b147E1c2b064F63" + "0x760888706690CA0eB1EeF1E84787E05fc96e01F0", + "0x760888706690CA0eB1EeF1E84787E05fc96e01F0" ], executors: [ - "0x746338765a8FbDD1c5aB61bfb92CD6D960C3C662", - "0x84f165521886642D24c55FACc886ab5986AD2d8b", - "0xe77b50153d64d112F0ae705d8a743f95939cB00d" + "0xC8EaDE915060491303B8062b743cC61687eD9d7e", + "0xC8EaDE915060491303B8062b743cC61687eD9d7e", + "0xC8EaDE915060491303B8062b743cC61687eD9d7e" ] } diff --git a/config/config_kcc.js b/config/config_kcc.js new file mode 100644 index 0000000..554ff64 --- /dev/null +++ b/config/config_kcc.js @@ -0,0 +1,32 @@ +const market = { + feeToAddress: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e", + mallFeeAddress: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e", + paymentTokens: [ + "0x0039f574ee5cc39bdd162e9a88e3eb1f111baf48", // USDT + ], +} + +const admins = { + admin: "0x565edA4ef351EB78F03B8AfCb6dCF02E29cAD62e", + proposers: [ + "0x14248857e0E03982F2C48B0FD7B2a223a884fbF3", + "0x6D0F7A84d7184B02B97C403a3b147E1c2b064F63" + ], + executors: [ + "0x746338765a8FbDD1c5aB61bfb92CD6D960C3C662", + "0x84f165521886642D24c55FACc886ab5986AD2d8b", + "0xe77b50153d64d112F0ae705d8a743f95939cB00d" + ] +} + +const token = { + baseTokenURI: 'https://market.cebg.games/api/nft/info/', +} + +var config = { + market, + admins, + token +} + +module.exports = config; \ No newline at end of file diff --git a/migrations/18_deploy_chip1155.js b/migrations/17_deploy_chip1155.js similarity index 100% rename from migrations/18_deploy_chip1155.js rename to migrations/17_deploy_chip1155.js diff --git a/migrations/17_update_timelock.js b/migrations/18_update_timelock.js similarity index 70% rename from migrations/17_update_timelock.js rename to migrations/18_update_timelock.js index 7ecb3b5..134acc1 100644 --- a/migrations/17_update_timelock.js +++ b/migrations/18_update_timelock.js @@ -11,6 +11,8 @@ const EvolveProxy = artifacts.require('EvolveProxy'); const LuckyBox = artifacts.require('mysterybox/BEMysteryBox'); const BoxProxy = artifacts.require('mysterybox/MysteryBoxProxy'); const NftProxy = artifacts.require('activate/NFTActivateProxy'); +const Chip1155 = artifacts.require('chip1155/BEChip1155'); +const ChipFactory = artifacts.require('chip1155/BEChipFactory'); const config = require("../config/config"); @@ -19,29 +21,31 @@ module.exports = async function (deployer, network, accounts) { try { const timelockInstance = await TimelockController.deployed(); const marketInstance = await MarketPlace.deployed(); - await marketInstance.transferOwnership(timelockInstance.address); - console.log('MarketPlace onwer has change to: ', timelockInstance.address); + // await marketInstance.transferOwnership(timelockInstance.address); + // console.log('MarketPlace onwer has change to: ', timelockInstance.address); const heroInstance = await Hero.deployed(); - await heroInstance.transferOwnership(timelockInstance.address); - console.log('Hero onwer has change to: ', timelockInstance.address); + // await heroInstance.transferOwnership(timelockInstance.address); + // console.log('Hero onwer has change to: ', timelockInstance.address); const equipInstance = await Equip.deployed(); - await equipInstance.transferOwnership(timelockInstance.address); - console.log('Equip onwer has change to: ', timelockInstance.address); + // await equipInstance.transferOwnership(timelockInstance.address); + // console.log('Equip onwer has change to: ', timelockInstance.address); const chipInstance = await Chip.deployed(); - await chipInstance.transferOwnership(timelockInstance.address); - console.log('Chip onwer has change to: ', timelockInstance.address); + // await chipInstance.transferOwnership(timelockInstance.address); + // console.log('Chip onwer has change to: ', timelockInstance.address); const proxyInstance = await EvolveProxy.deployed(); - await proxyInstance.transferOwnership(timelockInstance.address); - console.log('EvolveProxy onwer has change to: ', timelockInstance.address); + // await proxyInstance.transferOwnership(timelockInstance.address); + // console.log('EvolveProxy onwer has change to: ', timelockInstance.address); const coinInstance = await Coin.deployed(); const goldInstance = await Gold.deployed(); - await goldInstance.transferOwnership(timelockInstance.address); - console.log('BEGold onwer has change to: ', timelockInstance.address); + // await goldInstance.transferOwnership(timelockInstance.address); + // console.log('BEGold onwer has change to: ', timelockInstance.address); const factoryInstance = await Factory.deployed(); const boxInstance = await Box.deployed(); const luckyBoxInstance = await LuckyBox.deployed(); const boxProxyInstance = await BoxProxy.deployed(); const nftProxyInstance = await NftProxy.deployed(); + const chip1155Instance = await Chip1155.deployed(); + const chipFactoryInstance = await ChipFactory.deployed(); console.log('============= begin generate config ==============') let jsons = [] jsons.push({name: 'coin', json: 'assets/contracts/BECoin.json', address: coinInstance.address}) @@ -57,6 +61,8 @@ module.exports = async function (deployer, network, accounts) { jsons.push({name: 'luckbox', json: 'assets/contracts/BEMysteryBox.json', address: luckyBoxInstance.address}) jsons.push({name: 'boxproxy', json: 'assets/contracts/MysteryBoxProxy.json', address: boxProxyInstance.address}) jsons.push({name: 'activateproxy', json: 'assets/contracts/NFTActivateProxy.json', address: nftProxyInstance.address}) + jsons.push({name: 'chip1155', json: 'assets/contracts/BEChip1155.json', address: chip1155Instance.address}) + jsons.push({name: 'chipfactory', json: 'assets/contracts/BEChipFactory.json', address: chipFactoryInstance.address}) console.log(JSON.stringify(jsons)); console.log(`export const userAddress = '${accounts[0]}';`) console.log(`export const privateKey = '';`) diff --git a/package.json b/package.json index bd5e08b..7356e3a 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "test": "npx truffle test", "build": "truffle compile", "deploy:dev": "truffle migrate --network development", + "deploy:20": "truffle migrate --network lan20 --compile-none", "deploy:22": "truffle migrate --network lan22 --compile-none", "deploy:bsctest": "truffle migrate --network bsc_testnet --compile-none", "deploy:kcctest": "truffle migrate --network kcc_testnet --compile-none" diff --git a/truffle-config.js b/truffle-config.js index 7b87f00..06aa901 100644 --- a/truffle-config.js +++ b/truffle-config.js @@ -117,6 +117,11 @@ module.exports = { port: 8545, // Standard Ethereum port (default: none) network_id: "*", // Any network (default: none) }, + lan20: { + host: "10.0.1.20", // Localhost (default: none) + port: 7545, // Standard Ethereum port (default: none) + network_id: "*", // Any network (default: none) + }, development: { host: "127.0.0.1", // Localhost (default: none) port: 7545, // Standard Ethereum port (default: none)