Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Commit

Permalink
Fix KernelWrapper logging
Browse files Browse the repository at this point in the history
  • Loading branch information
martriay committed Apr 22, 2018
1 parent 1135f78 commit 6f7f109
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions deploy/objects/KernelWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,32 +14,32 @@ export default class KernelWrapper {
}

async mintZepTokens(to, amount) {
log("\nMinting ZEP tokens for the developer...");
log("Minting ZEP tokens for the developer...");
const zepToken = await this.zepToken();
log(" ZepToken:", zepToken.address);
log("ZepToken: ", zepToken.address);
const mintTx = await zepToken.mint(to, amount, { from: this.owner });
log(" Tokens minted: ", mintTx.tx)
log("Tokens minted: ", mintTx.tx)
return mintTx;
}

async registerRelease(contracts, developer) {
log(`\nDeploying a new release... `);
log("Deploying a new release...");
const release = await Release.new({ from: developer });
log(` Deployed at ${release.address}`);
log(` Adding contracts to release`)
log(`Deployed at ${release.address}`);
log("Adding contracts to release")
await Promise.all(contracts.map(async function ([contractName, contractKlazz]) {
const implementation = await contractKlazz.new();
await release.setImplementation(contractName, implementation.address, { from: developer });
log(` ${contractName} implementation: `, implementation.address);
log(`${contractName} implementation: `, implementation.address);
}));
log(` Freezing release`)
log("Freezing release")
await release.freeze({ from: developer });
log("\nRegistering the new release...");
log("Registering the new release...");
const zepToken = await this.zepToken();
const newVersionCost = await this.kernel.newVersionCost()
await zepToken.approve(this.kernel.address, newVersionCost, { from: developer });
const registrationTx = await this.kernel.register(release.address, { from: developer });
log(" Release registered: ", registrationTx.tx)
log("Release registered: ", registrationTx.tx)
return release;
}
}

0 comments on commit 6f7f109

Please sign in to comment.