forked from cawdevelopment/CawUsernames
-
Notifications
You must be signed in to change notification settings - Fork 0
/
1_initial_migration.js
27 lines (22 loc) · 1.05 KB
/
1_initial_migration.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
const CawName = artifacts.require("CawName");
const CawNameURI = artifacts.require("CawNameURI");
const CawActions = artifacts.require("CawActions");
const CawNameMinter = artifacts.require("CawNameMinter");
const CAW = artifacts.require("MintableCAW");
module.exports = async function (deployer) {
var caw = '0xf3b9569F82B18aEf890De263B84189bd33EBe452';
await deployer.deploy(CawNameURI);
var uriGenerator = await CawNameURI.deployed();
console.log("URI generator", uriGenerator.address);
await deployer.deploy(CawName, caw, uriGenerator.address);
var cawNames = await CawName.deployed();
console.log("DEPLOYED Caw Names: ", cawNames.address)
await deployer.deploy(CawNameMinter, caw, cawNames.address);
var minter = await CawNameMinter.deployed();
console.log("DEPLOYED Minter: ", minter.address)
await deployer.deploy(CawActions, cawNames.address);
var cawActions = await CawActions.deployed();
console.log("DEPLOYed action taker: ", cawActions.address)
cawNames.setMinter(minter.address);
cawNames.setCawActions(cawActions.address);
};