更新json
This commit is contained in:
parent
beb6119d67
commit
ce0b9065a7
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
13337
build/contracts/BEGold.json
Normal file
13337
build/contracts/BEGold.json
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -3169,7 +3169,7 @@
|
||||
}
|
||||
},
|
||||
"schemaVersion": "3.4.3",
|
||||
"updatedAt": "2022-02-18T08:03:21.545Z",
|
||||
"updatedAt": "2022-03-17T01:17:17.124Z",
|
||||
"networkType": "ethereum",
|
||||
"devdoc": {
|
||||
"kind": "dev",
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,5 +1,6 @@
|
||||
const market = {
|
||||
feeToAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39",
|
||||
mallFeeAddress: "0x50A8e60041A206AcaA5F844a1104896224be6F39",
|
||||
paymentTokens: [
|
||||
"0x67f6a7BbE0da067A747C6b2bEdF8aBBF7D6f60dc", // USDT
|
||||
],
|
||||
@ -11,7 +12,7 @@ const admins = {
|
||||
}
|
||||
|
||||
const token = {
|
||||
baseTokenURI: 'https://ghost.kingsome.cn/api/svr/tmp/',
|
||||
baseTokenURI: 'https://market.cebg.games/api/nft/info/',
|
||||
}
|
||||
|
||||
var config = {
|
||||
|
@ -12,7 +12,7 @@ contract BEBoxMall is Ownable, HasSignature, TimelockController{
|
||||
using SafeERC20 for IERC20;
|
||||
using Address for address;
|
||||
|
||||
uint256 public constant MIN_DELAY = 2 seconds;
|
||||
uint256 public constant MIN_DELAY = 2 days;
|
||||
uint256 public constant MAX_DELAY = 16 days;
|
||||
uint256 private _minDelay;
|
||||
|
||||
|
@ -3,7 +3,7 @@ pragma solidity 0.8.10;
|
||||
import "@openzeppelin/contracts/governance/TimelockController.sol";
|
||||
|
||||
contract BETimelockController is TimelockController {
|
||||
uint256 public constant MIN_DELAY = 2 seconds;
|
||||
uint256 public constant MIN_DELAY = 2 days;
|
||||
uint256 public constant MAX_DELAY = 16 days;
|
||||
uint256 private _minDelay;
|
||||
|
||||
|
@ -1,28 +0,0 @@
|
||||
const Hero = artifacts.require('BEHero');
|
||||
const Equip = artifacts.require('BEEquipment');
|
||||
const Chip = artifacts.require('BEChip');
|
||||
const config = require("../config/config");
|
||||
|
||||
module.exports = async function (deployer, network, accounts) {
|
||||
await deployer.deploy(Hero);
|
||||
const heroInstance = await Hero.deployed();
|
||||
if(heroInstance) {
|
||||
heroInstance.updateBaseURI(config.token.baseTokenURI)
|
||||
console.log("BEHero successfully deployed.")
|
||||
}
|
||||
|
||||
|
||||
await deployer.deploy(Equip);
|
||||
const equipInstance = await Equip.deployed();
|
||||
if(equipInstance) {
|
||||
equipInstance.updateBaseURI(config.token.baseTokenURI)
|
||||
console.log("Equip successfully deployed.")
|
||||
}
|
||||
|
||||
await deployer.deploy(Chip);
|
||||
const chipInstance = await Chip.deployed();
|
||||
if(chipInstance) {
|
||||
chipInstance.updateBaseURI(config.token.baseTokenURI)
|
||||
console.log("Chip successfully deployed.")
|
||||
}
|
||||
}
|
@ -1,41 +0,0 @@
|
||||
const MarketPlace = artifacts.require('MarketPlace');
|
||||
const Hero = artifacts.require('BEHero');
|
||||
const Equip = artifacts.require('BEEquipment');
|
||||
const Chip = artifacts.require('BEChip');
|
||||
const Coin = artifacts.require('BECoin');
|
||||
const config = require("../config/config");
|
||||
|
||||
module.exports = async function (deployer, network, accounts) {
|
||||
await deployer.deploy(MarketPlace);
|
||||
const marketInstance = await MarketPlace.deployed();
|
||||
if(marketInstance) {
|
||||
console.log("MarketPlace successfully deployed.")
|
||||
}
|
||||
try {
|
||||
marketInstance.setFeeToAddress(config.market.feeToAddress);
|
||||
marketInstance.setTransactionFee(300);
|
||||
const coinInstance = await Coin.deployed();
|
||||
config.market.paymentTokens.push(coinInstance.address);
|
||||
marketInstance.setPaymentTokens(config.market.paymentTokens);
|
||||
} catch(err) {
|
||||
console.log("MarketPlace setFeeToAddress or setPaymentTokens with error", err);
|
||||
}
|
||||
|
||||
// add marketplace to whitelist
|
||||
try {
|
||||
let heroInstance = await Hero.deployed();
|
||||
await heroInstance.addApprovalWhitelist(marketInstance.address);
|
||||
await heroInstance.setApprovalForAll(marketInstance.address);
|
||||
let equipInstance = await Equip.deployed();
|
||||
await equipInstance.addApprovalWhitelist(marketInstance.address);
|
||||
await equipInstance.setApprovalForAll(marketInstance.address);
|
||||
let chipInstance = await Chip.deployed();
|
||||
await chipInstance.addApprovalWhitelist(marketInstance.address);
|
||||
await chipInstance.setApprovalForAll(marketInstance.address);
|
||||
console.log(
|
||||
`Allow operation ${marketInstance.address} to reduce gas fee`
|
||||
);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
const Factory = artifacts.require('MinterFactory');
|
||||
const Hero = artifacts.require('BEHero');
|
||||
const Equip = artifacts.require('BEEquipment');
|
||||
const Chip = artifacts.require('BEChip');
|
||||
|
||||
module.exports = async function (deployer, network, accounts) {
|
||||
await deployer.deploy(Factory);
|
||||
const factoryInstance = await Factory.deployed();
|
||||
if(factoryInstance) {
|
||||
console.log("Mint Factory successfully deployed.")
|
||||
}
|
||||
try {
|
||||
let heroInstance = await Hero.deployed();
|
||||
let equipInstance = await Equip.deployed();
|
||||
let chipInstance = await Chip.deployed();
|
||||
factoryInstance.init([
|
||||
heroInstance.address,
|
||||
equipInstance.address,
|
||||
chipInstance.address
|
||||
])
|
||||
heroInstance.setMintFactory(factoryInstance.address);
|
||||
equipInstance.setMintFactory(factoryInstance.address);
|
||||
chipInstance.setMintFactory(factoryInstance.address);
|
||||
console.log(
|
||||
`Allow factory ${factoryInstance.address} to mint contract \n hero: ${heroInstance.address}, \n equip: ${equipInstance.address}, \n chip: ${chipInstance.address}`
|
||||
);
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
@ -1,30 +0,0 @@
|
||||
const EvolveProxy = artifacts.require('EvolveProxy');
|
||||
const Hero = artifacts.require('BEHero');
|
||||
const Equip = artifacts.require('BEEquipment');
|
||||
const Chip = artifacts.require('BEChip');
|
||||
|
||||
module.exports = async function (deployer, network, accounts) {
|
||||
await deployer.deploy(EvolveProxy);
|
||||
const proxyInstance = await EvolveProxy.deployed();
|
||||
if(proxyInstance) {
|
||||
console.log("EvolveProxy successfully deployed.")
|
||||
}
|
||||
try {
|
||||
let heroInstance = await Hero.deployed();
|
||||
let equipInstance = await Equip.deployed();
|
||||
let chipInstance = await Chip.deployed();
|
||||
proxyInstance.init([
|
||||
heroInstance.address,
|
||||
equipInstance.address,
|
||||
chipInstance.address
|
||||
])
|
||||
heroInstance.setBurnProxy(proxyInstance.address);
|
||||
equipInstance.setBurnProxy(proxyInstance.address);
|
||||
chipInstance.setBurnProxy(proxyInstance.address);
|
||||
console.log(
|
||||
`Allow proxy ${proxyInstance.address} to burn contract \n hero: ${heroInstance.address}, \n equip: ${equipInstance.address}, \n chip: ${chipInstance.address}`
|
||||
);
|
||||
} catch(err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
@ -1,23 +0,0 @@
|
||||
const Box = artifacts.require('BEBoxMall');
|
||||
|
||||
const config = require("../config/config");
|
||||
|
||||
module.exports = async function (deployer, network, accounts) {
|
||||
await deployer.deploy(
|
||||
Box,
|
||||
config.admins.proposers,
|
||||
config.admins.executors
|
||||
);
|
||||
const boxInstance = await Box.deployed();
|
||||
if(boxInstance) {
|
||||
console.log("BEBoxMall successfully deployed.")
|
||||
}
|
||||
try {
|
||||
await boxInstance.setPaymentReceivedAddress(config.market.feeToAddress);
|
||||
console.log(
|
||||
`update payment received address: ${config.market.feeToAddress}`
|
||||
);
|
||||
} catch (err) {
|
||||
console.log(err);
|
||||
}
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
const TimelockController = artifacts.require('BETimelockController');
|
||||
const config = require("../config/config");
|
||||
|
||||
|
||||
module.exports = async function (deployer, network, accounts) {
|
||||
await deployer.deploy(
|
||||
TimelockController,
|
||||
config.admins.proposers,
|
||||
config.admins.executors
|
||||
);
|
||||
const timelockInstance = await TimelockController.deployed();
|
||||
if(timelockInstance) {
|
||||
console.log("TimelockController successfully deployed.")
|
||||
}
|
||||
}
|
@ -1,53 +0,0 @@
|
||||
const TimelockController = artifacts.require('BETimelockController');
|
||||
const Box = artifacts.require('BEBoxMall');
|
||||
const Coin = artifacts.require('BECoin');
|
||||
const Hero = artifacts.require('BEHero');
|
||||
const Equip = artifacts.require('BEEquipment');
|
||||
const Chip = artifacts.require('BEChip');
|
||||
const MarketPlace = artifacts.require('MarketPlace');
|
||||
const Factory = artifacts.require('MinterFactory');
|
||||
const EvolveProxy = artifacts.require('EvolveProxy');
|
||||
const config = require("../config/config");
|
||||
|
||||
|
||||
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);
|
||||
const heroInstance = await Hero.deployed();
|
||||
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);
|
||||
const chipInstance = await Chip.deployed();
|
||||
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);
|
||||
console.log('============= begin generate config ==============')
|
||||
const coinInstance = await Coin.deployed();
|
||||
const factoryInstance = await Factory.deployed();
|
||||
const boxInstance = await Box.deployed();
|
||||
let jsons = []
|
||||
jsons.push({name: 'coin', json: 'assets/contracts/BECoin.json', address: coinInstance.address})
|
||||
jsons.push({name: 'hero', json: 'assets/contracts/BEHero.json', address: heroInstance.address})
|
||||
jsons.push({name: 'equip', json: 'assets/contracts/BEEquipment.json', address: equipInstance.address})
|
||||
jsons.push({name: 'chip', json: 'assets/contracts/BEChip.json', address: chipInstance.address})
|
||||
jsons.push({name: 'factory', json: 'assets/contracts/MinterFactory.json', address: factoryInstance.address})
|
||||
jsons.push({name: 'market', json: 'assets/contracts/MarketPlace.json', address: marketInstance.address})
|
||||
jsons.push({name: 'mall', json: 'assets/contracts/BEBoxMall.json', address: boxInstance.address})
|
||||
jsons.push({name: 'proxy', json: 'assets/contracts/EvolveProxy.json', address: proxyInstance.address})
|
||||
jsons.push({name: 'timelock', json: 'assets/contracts/BETimelockController.json', address: timelockInstance.address})
|
||||
console.log(jsons);
|
||||
console.log(`export const userAddress = '${accounts[0]}';`)
|
||||
console.log(`export const privateKey = '';`)
|
||||
console.log(`export const userBuyAddress = '${accounts[1]}';`)
|
||||
} catch(err) {
|
||||
console.log('generate config with error: ', err);
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user