23 lines
973 B
JavaScript
23 lines
973 B
JavaScript
const Chip = artifacts.require('chip1155/BEChip1155');
|
|
const ChipFactory = artifacts.require('chip1155/BEChipFactory');
|
|
const config = require("../config/config");
|
|
|
|
module.exports = async function (deployer, network, accounts) {
|
|
await deployer.deploy(Chip);
|
|
const chipInstance = await Chip.deployed();
|
|
if(chipInstance) {
|
|
console.log("Chip 1155 successfully deployed.")
|
|
}
|
|
await deployer.deploy(ChipFactory);
|
|
const factoryInstance = await ChipFactory.deployed();
|
|
if(factoryInstance) {
|
|
console.log("Chip 1155 Factory successfully deployed.")
|
|
}
|
|
await factoryInstance.init(chipInstance.address);
|
|
await factoryInstance.updateExecutor(config.admins.admin);
|
|
console.log("Chip 1155 Factory successfully update setting.")
|
|
await chipInstance.setMintFactory(factoryInstance.address);
|
|
console.log("Chip 1155 successfully update factory.")
|
|
await chipInstance.grantLockRole(config.admins.admin);
|
|
console.log("Chip 1155 successfully grantLockRole.")
|
|
} |