becrypto/migrations/7_deploy_market.js
2023-09-06 13:54:51 +08:00

100 lines
3.3 KiB
JavaScript

const BENftMarket = artifacts.require("market/BENftMarket");
// const BENftMall = artifacts.require("market/BENftMall");
const BENftMallTrans = artifacts.require("market/BENftMallTrans");
const GameItemMarket = artifacts.require("market/GameItemMarket");
const GameItemMall = artifacts.require("market/GameItemMall");
const FT = artifacts.require("tokens/erc20/FT");
const BETokenMall = artifacts.require("market/BETokenMall");
const config = require("../config/config");
const base = require("../scripts/base");
module.exports = async function (deployer, network, accounts) {
// await deployer.deploy(BENftMarket);
// const marketInstance = await BENftMarket.deployed();
// if (marketInstance) {
// console.log("MarketPlace successfully deployed.");
// }
// base.updateArray({
// name: "BENftMarket",
// type: "logic",
// json: "assets/contracts/BENftMarket.json",
// address: marketInstance.address,
// network,
// });
// await deployer.deploy(BENftMall);
// const nftMallInstance = await BENftMall.deployed();
// if (nftMallInstance) {
// console.log("BENftMall successfully deployed.");
// }
// base.updateArray({
// name: "BENftMall",
// type: "logic",
// json: "assets/contracts/BENftMall.json",
// address: nftMallInstance.address,
// network,
// });
await deployer.deploy(BENftMallTrans);
const nftMallInstance = await BENftMallTrans.deployed();
if (nftMallInstance) {
console.log("BENftMallTrans successfully deployed.");
}
base.updateArray({
name: "BENftMallTrans",
type: "logic",
json: "assets/contracts/BENftMallTrans.json",
address: nftMallInstance.address,
network,
});
// let cfgs = base.loadData({ network });
// const cegInstance = await FT.at(cfgs.find((c) => c.name === "CEG").address);
// await deployer.deploy(
// BETokenMall,
// cegInstance.address,
// config.market.feeToAddress
// );
// const tokenMallInstance = await BETokenMall.deployed();
// if (tokenMallInstance) {
// console.log("BETokenMall successfully deployed.");
// }
// await tokenMallInstance.setFeeToAddress(config.market.feeToAddress);
// const usdcInstance = await FT.at(
// cfgs.find((c) => c.name === "BEUSDC").address
// );
// await tokenMallInstance.addERC20Support(usdcInstance.address);
// await tokenMallInstance.updateTokenPrice(usdcInstance.address, "10000000");
// base.updateArray({
// name: "BETokenMall",
// type: "logic",
// json: "assets/contracts/BETokenMall.json",
// address: tokenMallInstance.address,
// network,
// });
// await deployer.deploy(GameItemMarket);
// const gameMarketInstance = await GameItemMarket.deployed();
// if (gameMarketInstance) {
// console.log("GameItemMarket successfully deployed.");
// }
// base.updateArray({
// name: "GameItemMarket",
// type: "logic",
// json: "assets/contracts/GameItemMarket.json",
// address: gameMarketInstance.address,
// network,
// });
// await deployer.deploy(GameItemMall);
// const gameMallInstance = await GameItemMall.deployed();
// if (gameMallInstance) {
// console.log("GameItemMall successfully deployed.");
// }
// base.updateArray({
// name: "GameItemMall",
// type: "logic",
// json: "assets/contracts/GameItemMall.json",
// address: gameMallInstance.address,
// network,
// });
};