-
Notifications
You must be signed in to change notification settings - Fork 4
/
4_deploy_LOCIregister.js
34 lines (25 loc) · 1.51 KB
/
4_deploy_LOCIregister.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
28
29
30
31
32
33
34
const SafeMath = artifacts.require('zeppelin-solidity/contracts/math/SafeMath.sol');
const Ownable = artifacts.require('zeppelin-solidity/contracts/ownership/Ownable.sol');
const Contactable = artifacts.require('zeppelin-solidity/contracts/ownership/Contactable.sol');
const LOCIcoin = artifacts.require("./LOCIcoin.sol");
const LOCIregister = artifacts.require("./LOCIregister.sol");
const BigNumber = require('bignumber.js');
module.exports = (deployer, network, accounts) => {
let deployAddress = accounts[0]; // by convention
console.log('Preparing for deployment of LOCIregister...');
if( network == "live" ) {
console.log("Using LOCIcoin at:" + LOCIcoin.address);
throw "Halt. Sanity check. Not ready for deployment to live network. Manually remove this throw and try again.";
}
console.log('deploying from:' + deployAddress);
console.log('deploying SafeMath Ownable Contactable');
//deployer.deploy(SafeMath, {from: deployAddress});
//deployer.deploy(Ownable, {from: deployAddress});
//deployer.deploy(Contactable, {from: deployAddress});
console.log('linking Ownable SafeMath Contactable');
deployer.link(Ownable, [LOCIregister], {from: deployAddress});
deployer.link(SafeMath, [LOCIregister], {from: deployAddress});
deployer.link(Contactable, [LOCIregister], {from: deployAddress});
console.log('deploying LOCIregister');
deployer.deploy(LOCIregister, LOCIcoin.address, 'LOCIpro.com', {from: deployAddress});
};