Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var SafeMath = artifacts.require("./SafeMath.sol");
- var TahaCoin = artifacts.require("./TahaCoin.sol");
- var Crowdsale = artifacts.require("./Crowdsale.sol");
- module.exports = function(deployer) {
- var owner = web3.eth.accounts[0];
- var wallet = web3.eth.accounts[1];
- //var owner = '0x398DB5039aA7f064a8cBDe5c302E09E2cAc46487';
- //var wallet = '0x6A0a14e7aAF404D0E5Cc118ECA740568d936fC9F';
- console.log("Owner address: " + owner);
- console.log("Wallet address: " + wallet);
- deployer.deploy(SafeMath, { from: owner });
- deployer.link(SafeMath, TahaCoin);
- deployer.deploy(TahaCoin, { from: owner }).then(function(instance) {
- console.log("TahaCoin address: " + TahaCoin.address);
- return deployer.deploy(Crowdsale, TahaCoin.address, wallet, { from: owner }).then(function(instance) {
- console.log("Crowdsale address: " + Crowdsale.address);
- return TahaCoin.deployed().then(function(coin) {
- return coin.owner.call().then(function(owner) {
- console.log("TahaCoin owner : " + owner);
- return coin.transferOwnership(Crowdsale.address, {from: owner}).then(function(txn) {
- console.log("TahaCoin owner was changed: " + Crowdsale.address);
- });
- })
- });
- });
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement