Skip to content

Commit

Permalink
title needs to be bytes32 to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
propulsor committed Apr 3, 2019
1 parent 54d473c commit bd85329
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions migrations/6_deploy_utility_contracts.js
Expand Up @@ -2,29 +2,28 @@ const ZapCoordinator = artifacts.require('./ZapCoordinator.sol');
const TokenFactory = artifacts.require('./TokenFactory.sol');
const TokenDotFactory = artifacts.require('./TokenDotFactory.sol');
const web3Utils = require('web3-utils');
const title = "TokenDotFactory";
const pubkey = web3Utils.toBN("036b5252a719be12e4aa87faf67a410ce894d0f79a997fc21ee379ff3d");
const title = web3Utils.utf8ToHex("TokenDotFactory");
const pubkey = web3Utils.toBN("036b5252a719be12e4aa87faf67a410ce894d0f79a997fc21ee379ff3d");

const deploy = async function(deployer, network) {
console.log("Deploying utility contracts on: " + network);
console.log(ZapCoordinator.address, TokenFactory.address, pubkey, title);

sleep(network);
if(ZapCoordinator.address) {
await deployer.deploy(TokenDotFactory, ZapCoordinator.address, TokenFactory.address, pubkey, title);
const TokenDotFactoryInstance = TokenDotFactory.deployed();
}
else{
console.log('ZapCoordinator not found');
}
console.log("Deploying utility contracts on: " + network);
console.log(ZapCoordinator.address, TokenFactory.address, pubkey, title);

sleep(network);
if (ZapCoordinator.address) {
await deployer.deploy(TokenDotFactory, ZapCoordinator.address, TokenFactory.address, pubkey, title);
const TokenDotFactoryInstance = TokenDotFactory.deployed();
} else {
console.log('ZapCoordinator not found');
}
};

module.exports = (deployer, network) => {
deployer.then(async () => await deploy(deployer, network));
deployer.then(async () => await deploy(deployer, network));
};

function sleep(network) {
if ( network == "kovan" ) {
return new Promise(resolve => setTimeout(resolve, 200000));
}
}
if (network == "kovan") {
return new Promise(resolve => setTimeout(resolve, 200000));
}
}

0 comments on commit bd85329

Please sign in to comment.